[
https://issues.apache.org/jira/browse/THRIFT-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973935#comment-13973935
]
Jin-wook Jeong commented on THRIFT-2460:
----------------------------------------
On Windows, SOCKET is unsigned int, and INVALID_SOCKET is (~0).
So, you can use (-1) for the THRIFT_INVALID_SOCKET on Windows, as well.
(~0) is more appropriate for unsigned int, but no difference between (-1) and
(~0), practically.
> 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
> Assignee: Jens Geyer
> Fix For: 0.9.2
>
> 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)