machinezone / IXWebSocket

websocket and http client and server library, with TLS support and very few dependencies
BSD 3-Clause "New" or "Revised" License
512 stars 167 forks source link

Fix hanging of WebSocket::stop() waiting for its thread to join #481

Closed dacap closed 10 months ago

dacap commented 10 months ago

This might happen in some special cases where WebSocketTransport::sendOnSocket() fails, closes the socket, and set the ready state to CLOSED, but WebSocket::run() stills wait the interrupt event to happen.

Possibly related to #474.

dacap commented 10 months ago

I've just updated the PR to match the if (...) { ... } style.

dacap commented 10 months ago

Finally updated this PR as a specific test (IXWebSocketTestConnectionDisconnection) was failing.

Now all tests pass.

bsergean commented 10 months ago

looking good ci wise, re-ran them.

bsergean commented 10 months ago

thanks @dacap