mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
bcaa2ad0d6
When a function called by the forking python thrift server throws an exception the client will hang. This happens because the parent of the forked process does not properly close the socket fd. Under normal operation the server operation completes and returns a value to the client. However, when an exception occurs the 'end' message is never sent to the client so the client relies on a connection close to abort the call (this is how the threading server works I believe). This fails with the forking server because the parent process never closes the socket fd. The child has closed the fd at this point, but the connection will not actually be closed until all open instances of the fd are closed. Since the client is waiting for a message and the server never closes it the client is forced to wait until a read timeout occurs many minutes later. This diff closes the parent's copy of the socket fd immediately after the fork occurs. I modified my load test server to throw an exception. The client did not hang. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666363 13f79535-47bb-0310-9956-ffa450edef68 |
||
---|---|---|
.. | ||
explicit_module | ||
Makefile.am | ||
RunClientServer.py | ||
SerializationTest.py | ||
TestClient.py | ||
TestEof.py | ||
TestServer.py | ||
TestSocket.py |