-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Stop server error #2637
Comments
If you want emulate Ctrl+C -- send P.S. Stopping web server by regular websocket message sounds very strange for me. The server is multi-client application by definition, stopping serving all connections by single request from arbitrary client sounds weird. |
Try to send signal.SIGINT to own process os.getpid() |
Basically, this is running without a console with only a html gui so I need the message to shutdown down the application. |
How do you shutdown, e.g. NGINX? |
I have this in a single python script that receives messages from a html+js client. I use pyinstaller on this script, but there is no console when using pyinstaller. This solution is supposed to be the same as closing the program by closing the console if there were one. |
It's all in a repo here: https://github.com/johnroper100/Tonalite |
@hellysmile approach should work |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
I'm trying to send a message to the server that stops both the web server as well as the python-socketio server (they are connected).
I currently have this code:
Expected behaviour
I would expect the script to close just as if I was clicking
CTRL+C
in the terminal.Actual behaviour
I get this error:
Your environment
I'm using aiohttp as a server on both Windows and Linux.
The text was updated successfully, but these errors were encountered: