Thrift: bug fix for interrupting server socket
authorDavid Reiss <dreiss@apache.org>
Fri, 18 Apr 2008 17:48:03 +0000 (17:48 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 18 Apr 2008 17:48:03 +0000 (17:48 +0000)
commit2724c7a311dcab7422fd410444d89946ef759c0d
treee87b6c1976cd1e2206db3a28ee3a2dc0db5dabc5
parent739cbe2b86c8b4a50f3305f7edefd142cad423f8
Thrift: bug fix for interrupting server socket

Summary: TServerSocket uses a socket pair to signal interruption to the select() call on its main server socket.  A bug in the code prevented the select() from listening for events on the internal socket pair; in fact, it was accidentally listening to file descriptor 1.

Reviewed By: aditya

Test Plan: Use a server that supports a call to shutdown, which should signal an interrupt to the internal socket, and should result in an immediate and clean termination of the server socket thread.

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 11932

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665658 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/transport/TServerSocket.cpp