hunchensocket icon indicating copy to clipboard operation
hunchensocket copied to clipboard

Don't reset write-lock

Open tdrhq opened this issue 2 years ago • 0 comments

Setting write-lock to nil, will mean that following requests will fail in a very cryptic way. For instance, if I close the browser tab, the connection gets closed. But I have a thread that's still writing stuff to the websocket. Ideally, I'd like to get a socket error, not an error about the lock being nil.

I have a few more pull requests coming up. Not having a reliable lock, also makes it hard to write logic for the multithreading edge cases.

tdrhq avatar Mar 06 '22 18:03 tdrhq