Closed SyRenity closed 9 years ago
Following more testing, it seems as the websocket actually can be opened on same port, following CTRL-C, at least it returns "bad protocol" in case I submit a non-supported one.
That said, it stops receiving any messages, and have to be relaunched on another port to work.
Any chance it's related to fact I'm using step(1) approach (a 1 second timeout), and drive the Lua script from a C-based app?
My bad, the socket closed due to empty data being attempted to be sent.
It seems the sockets linger after being closed by Ctrl-C, and do not accept new receives on same port, until a timeout passes. The only way to solve this immediately is to change the port.
Is there a proper way to close the sockets?