Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.11.0
-
None
-
None
Description
I implemented a thrift server with TSimpleServer in a C# application:
public class ThriftServer
{
public void start()
private void run()
public void stop()
}
Moreover I implemented a C++ application for the thrift client.
When a client is connected to the C# server, there's no way to exit the C# application. In fact server.Server() is blocked and server.Stop() does nothing to make the Serve() call exiting.
If I close the C++ application (so the related thrift client) the server.Serve() call returns immediately and the C# application ends.
In release 0.11.0 the blocking call is at line 137 of TSimpleServer.cs:
if (!inputTransport.Peek())
Following implementation is useless in this case.
public override void Stop()
{ stop = true; serverTransport.Close(); }Attachments
Issue Links
- is related to
-
THRIFT-2441 Cannot shutdown TThreadedServer when clients are still connected
- Closed
-
THRIFT-4252 Cannot shutdown Java server when clients are still connected
- Closed