Github user abadcafe commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/422#discussion_r28532945
  
    --- Diff: lib/cpp/src/thrift/server/TNonblockingServer.cpp ---
    @@ -1393,9 +1397,42 @@ bool 
TNonblockingIOThread::notify(TNonblockingServer::TConnection* conn) {
         return false;
       }
     
    -  const int kSize = sizeof(conn);
    -  if (send(fd, const_cast_sockopt(&conn), kSize, 0) != kSize) {
    -    return false;
    +  fd_set wfds, efds;
    +  int ret = -1;
    +  int kSize = sizeof(conn);
    +  const char * pos = (const char *)const_cast_sockopt(&conn);
    +
    +  while (kSize > 0) {
    +    FD_ZERO(&wfds);
    +    FD_ZERO(&efds);
    +    FD_SET(fd, &wfds);
    +    FD_SET(fd, &efds);
    +    ret = select(fd + 1, NULL, &wfds, &efds, NULL);
    --- End diff --
    
    In early windows(<= XP), there is no poll() function. The implement of 
THRIFT_POLL in windows XP was simulated by select(). The problem is the fake 
poll() lacks POLL_HUP/POLL_ERR state, I am afraid it was not function completed?
    
    On the other side, select() is common enough on every platform supported by 
thrift.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to