Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Shutdown doesn't work if client is connected #27

Closed
switschel opened this issue Dec 10, 2021 · 2 comments
Closed

Server Shutdown doesn't work if client is connected #27

switschel opened this issue Dec 10, 2021 · 2 comments

Comments

@switschel
Copy link
Collaborator

Currently it is not implemented to shutdown the TCP socket if a client is still connected.
CTRL + C prints that the Server will be shut down but will wait forever.

https://github.com/SoftwareAG/cumulocity-remote-access-local-proxy/blob/5314b80365c82626a17561acc4f57d209c757b80/c8ylp/tcp_socket/tcp_server.py#L155-L159

@switschel
Copy link
Collaborator Author

https://docs.python.org/3/library/socketserver.html
shutdown()
Tell the serve_forever() loop to stop and wait until it does. shutdown() must be called while serve_forever() is running in a different thread otherwise it will deadlock.

switschel added a commit that referenced this issue Feb 14, 2022
switschel added a commit that referenced this issue Feb 14, 2022
@switschel
Copy link
Collaborator Author

Fixed with #39

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

No branches or pull requests

1 participant