fukamachi / websocket-driver

WebSocket server/client implementation for Common Lisp
BSD 2-Clause "Simplified" License
103 stars 27 forks source link

close-connection causes websocket read thread to spin and use 100% CPU #49

Open eeeeeta opened 4 years ago

eeeeeta commented 4 years ago

When calling wsd:close-connection on a connection object, the websocket read thread associated with that object starts using 100% CPU trying to call READ-SEQUENCE, erroring out (because the stream is closed), and then for some reason it ignores the error and retries ad infinitum.

I worked around this with bt:destroy-thread in my application, but ideally the read thread should be properly closed when the connection is... (and, for that matter, probably shouldn't ignore read errors either)