jaxl/JAXL

JAXL doesn't emit on_disconnect event if connection was just closed from another side

Nokim opened this issue · 2 comments

I'm running script in screen app. Here is part from log:

jaxl_socket_server:63 - 2013-09-14 07:25:24 - socket ready to accept on path unix:///xx...xx/JAXL/.jaxl/sock/jaxl_5479.sock
msg_bot:55 - 2013-09-14 07:25:25 - got on_auth_success cb
jaxl_socket_client:175 - 2013-09-25 17:20:00 - socket eof, disconnecting

After few days i've logged in and pressed Ctrl-C:

^Cmsg_bot:103 - 2013-10-02 08:30:52 - got on_disconnect cb
jaxl_exception:48 - 2013-10-02 08:30:52 - got jaxl exception construct with fclose() expects parameter 1 to be resource, null given, 2, /www/g1/heroeslands/xmpp/JAXL/core/jaxl_socket_client.php, 126
jaxl:211 - 2013-10-02 08:30:52 - cleaning up pid and unix sock files
jaxl_socket_server:75 - 2013-10-02 08:30:52 - shutting down socket server
jaxl_clock:55 - 2013-10-02 08:30:52 - shutting down clock server...

Looking in code reveals that connection just silently closed and no other action was done. And no simple means to emit event or other ways to notify higher levels of app about disconnect.

Kinda duplicate of #19?

It may be related but that is different issue.