Closed dreboli closed 9 years ago
Thanks again @dreboli
Yes this issue started when I switched Flask to use threading (see the very last line of client.py) which is: app.run(debug=True,threaded=True)
I get it quite a alot and its very annoying especially becasue I am constantly restarting the software. One of the flask threads is not exiting for some reason under certain circumstances. The client-backend thread does exit cleanly but for some reason flask doesn't and remains bound to port 5000 which casues a problem when you re-run the client which of course wants to listen on port 5000.
Adding it to the bugfix list
This one is turning out to be quite elusive If you hit log-out before shutting down the client it usually works ok.
Trying to stop and restart the client whenlogged in will sometimes give you this error. I played with SOREUSEADDR and PORT but then started getting a much bigger problem which is some requests being serviced by the old process and some by the new, very bad.
So for now I will fix this by adding a log-out and shutdown option on the menu.
This is fixed by the recent commit 161716b092e37d55cd8b7539f13ac0ae773bdeea
This commit introduces a launcher which forks the client front-end Flask thread. Clean up and the end is better.
Problem appears resolved on Linux and WIndows so closing.
Thanks again @dreboli
Sometimes CTRL+C doesn't kill client.py properly, it stucks listening on the socks port and the client can't be started again because of that.
Trying to start client.py again throws:
I can't replicate the problem yet, not sure if a clean(er) exit is possible or beneficial, just throwing it out here as I've ran into this a couple of times.
This is how I check what's listening on the socks port:
And to kill it:
where 2687 is the PID. Without
-9
it can't be killed