Closed sean324 closed 1 year ago
This only occurs in CPython when exiting without gracefully shutdown https://github.com/cirospaciari/socketify.py/blob/main/examples/graceful_shutdown.py
This do not impact in the actual program but I will add an gracefully shutdown by default when exiting with signals, PyPy do not have the same behavior, CPython implementation of CFFI maybe be the issue
@seanr3 fixed on commit https://github.com/cirospaciari/socketify.py/commit/75ee2771717d7c566b41609bd6234cee749c396a
As part of the graceful shutdown by default, can you have it disconnect existing WebSockets and shutdown? Currently, if you hit Control-C (on macOS) it'll gracefully shutdown if there are no existing WebSockets, but if there are existing WebSockets then it won't shutdown until the last WebSocket is closed from the client's end.
@seanr3 I think this is related to https://github.com/uNetworking/uWebSockets/discussions/1528
I will add docs about filter in python soon
As part of the graceful shutdown by default, can you have it disconnect existing WebSockets and shutdown? Currently, if you hit Control-C (on macOS) it'll gracefully shutdown if there are no existing WebSockets, but if there are existing WebSockets then it won't shutdown until the last WebSocket is closed from the client's end.
@seanr3 close behavior with Control-C fixed in v0.0.3 see https://github.com/cirospaciari/socketify.py/releases/tag/v0.0.3
Describe the bug When I run the Hello World program in the README and then exit it with Control-C (on macOS) it gives the following error:
To Reproduce Steps to reproduce the behavior:
condo create -n socketify-test python=3.10
and then activate it.pip install git+https://github.com/cirospaciari/socketify.py.git
Expected behavior To see no error.
Desktop (please complete the following information):