You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2009/09/19 03:59:13 UTC

svn commit: r816850 - /incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp

Author: dreiss
Date: Sat Sep 19 01:59:13 2009
New Revision: 816850

URL: http://svn.apache.org/viewvc?rev=816850&view=rev
Log:
THRIFT-587. cpp: Properly set addrLen before accept calls

Modified:
    incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp

Modified: incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp?rev=816850&r1=816849&r2=816850&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp Sat Sep 19 01:59:13 2009
@@ -591,6 +591,9 @@
 
     // Put this client connection into the proper state
     clientConnection->transition();
+
+    // addrLen is written by the accept() call, so needs to be set before the next call.
+    addrLen = sizeof(addr);
   }
 
   // Done looping accept, now we have to make sure the error is due to