IXWebSocket icon indicating copy to clipboard operation
IXWebSocket copied to clipboard

Do not invoke message callbacks if we aren't connected.

Open bsergean opened this issue 7 months ago • 2 comments

bsergean avatar May 22 '25 19:05 bsergean

I had dabbled/hoped to come up with something that would delay the close callback. It'd be great to consume the bytes/frames that are already in the _rxbuf or still buffered in the socket, even if a send failed.

Otherwise, if the client sent a last CLOSE frame or an error indication in a text/binary frame, but then severed the connection, this fix wouldn't allow the server to get to that message. Is that motivation enough for a more complicated fix?

awelzel avatar May 24 '25 14:05 awelzel

Other option is to not fail send() the same way when we aren't connected, taking out that early out.

I haven't run the autobahn test for a while btw ... I wonder if those fixes break something or not spec wise

bsergean avatar May 29 '25 14:05 bsergean