Closed dblock closed 8 years ago
websocket-driver doesn't know anything about sockets and certainly doesn't know how to listen for them closing, whichever I/O framework you're using. Your integration with Celluloid needs to listen for the socket being closed and emit an event accordingly. This event does not actually involve the driver since it's not related to data being transferred as part of the protocol.
For example, faye-websocket listens for the client TCP/TLS socket being closed:
and emits its own event without invoking the driver:
I see. So clearly this is something missing in celluloid-io. Thans @jcoglan, I'll close this.
From https://github.com/celluloid/celluloid-io/issues/176 (repro code in the issue). I am not sure whether this is a websocket-driver-ruby problem or celluloid-io, but this works with EventMachine as expected. Under Celluloid when the socket closes the driver sees a
:close
event when the server closes the connection.