Closed vbmithr closed 10 years ago
I'm currently being bitten by this problem... ;-)
Anyway, I reckon the approach more convenient for users would be for Websocket.establish_server
to automatically close the FD when the callback function terminates.
The question remains, however, whether to expect users to explicitly check within the callback function whether Frame.opcode
is Close
(and terminate if so), or if Websocket.establish_server
should do that automatically as well. I think the first approach may be more flexible, as long as the documentation states in very big letters that users should be diligent under penalty of leaking FDs...
I think this is fixed now. Please reopen if not.
Currently the functions returning streams lack a way to close the underlying connection, causing fds to leak.