vbmithr / ocaml-websocket

Websocket library for OCaml
ISC License
163 stars 44 forks source link

Signal socket close to client prior to logging. #28

Closed j0sh closed 9 years ago

j0sh commented 9 years ago

For some odd reason, the client will not receive the close signal if it is sent after the log call. Even stranger, it does not work without the log call, and the LWT_LOG env var must be set to something printable, eg LWT_LOG="*->debug".

Test case: https://gist.github.com/j0sh/71c31743d4057a6f365f Connect and disconnect (any) client; if it is working, then "user disconnected" should print.

This isn't really a fix, but hopefully helps illustrate the problem -- if the solution isn't obvious from this, I can start looking within Lwt.

vbmithr commented 9 years ago

I'll have a look today.

vbmithr commented 9 years ago

Thanks, but I'm working on a hugely rewritten version now.