thriftpy icon indicating copy to clipboard operation
thriftpy copied to clipboard

T(...)Server.close() cannot stop the server

Open Zlika opened this issue 7 years ago • 1 comments

Hello, The "close" method of the TSimpleServer/TThreadedServer classes cannot close the server because the thread who called "serve()" is blocked at "client = self.trans.accept()". The only way I found to stop it is to call "server.trans.close()" after "server.close()", which is not obvious. I think you should call "self.trans.close()" in the TServer.close() method. If you agree I can propose a PR. Regards

Zlika avatar Apr 28 '17 08:04 Zlika

I am glad to see your pull request, thanks.

ethe avatar Dec 09 '18 15:12 ethe