[
https://issues.apache.org/jira/browse/THRIFT-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13968795#comment-13968795
]
Jens Geyer commented on THRIFT-2460:
------------------------------------
Hi [~hsleep],
thanks for the patch. Unfortunately, I have some problems with it, which should
be adressed:
1. there should be *exactly one definition* of {{#define THRIFT_INVALID_SOCKET
(-1)}}, not three.
2. on Windows, there is a predefined constant {{INVALID_SOCKET}} which should
be used instead of {{(-1)}}, if available
Could you please fix this?
> unopened socket fd must be less than zero.
> ------------------------------------------
>
> Key: THRIFT-2460
> URL: https://issues.apache.org/jira/browse/THRIFT-2460
> Project: Thrift
> Issue Type: Bug
> Components: C glib - Library
> Affects Versions: 0.9.1
> Reporter: Jaesang Kim
> Attachments: thrift-2460-unopened_socket_set_to_negative_integer.patch
>
>
> ThriftSocket->sd is 0 when initialized.
> But socket() function return a fd number greater than *equal* 0.
> So, ThriftSocket->sd must be less than 0 in initialize function.
--
This message was sent by Atlassian JIRA
(v6.2#6252)