Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

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

Open
Zlika opened this issue Apr 28, 2017 · 1 comment
Open

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

Zlika opened this issue Apr 28, 2017 · 1 comment

Comments

@Zlika
Copy link

Zlika commented Apr 28, 2017

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

@ethe
Copy link
Member

ethe commented Dec 9, 2018

I am glad to see your pull request, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants