[ https://issues.apache.org/jira/browse/THRIFT-3447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15028837#comment-15028837 ]
Tobias Stampfl commented on THRIFT-3447: ---------------------------------------- I'm running the service in a unity project, to control the application from another one written in python. Here is how I start the service: {code:none} var processor = new UXToolCom.UXToolService.Processor(handler); TServerTransport transport = new TServerSocket(port); server = new TThreadPoolServer(processor, transport); serverThread = new Thread(() =>{server.Serve();}) { IsBackground = true }; serverThread.Start(); {code} After the server is running, i connect to it from the python application. When I close my server application, I call server.Stop() to shut down the service. But the application hangs as long as the client is connected. I guess the serverThread ist still alive. > Cannot shutdown TThreadPoolServer when clients are still connected > ------------------------------------------------------------------ > > Key: THRIFT-3447 > URL: https://issues.apache.org/jira/browse/THRIFT-3447 > Project: Thrift > Issue Type: Bug > Components: C# - Library > Affects Versions: 0.9.1, 0.9.3 > Reporter: Tobias Stampfl > > When calling Stop() on the TThreadPoolServer, Serve() is still blocking, till > the last client disconnected. I do not know if this is intentional, but how > can I stop the server without depending on the clients. Killing the Thread > that runs Serve() is not really what i want. > There was a similar Bug in the C++ Library: > [THRIFT-2441|https://issues.apache.org/jira/browse/THRIFT-2441] -- This message was sent by Atlassian JIRA (v6.3.4#6332)