#528 server_select and server_event call different callbacks on connection failure

Reporter Zash
Owner Zash
Created
Updated
Stars (0)  
Tags
  • Priority-Medium
  • Status-Started
  • Type-Defect
  1. Zash on

    This is a graph of the number of s2s connections: http://h45h.com/gM_16y0eRVVNhE_a2ujZCVmXK2fMmVlKx2zztSTinz4= After some time, they start going negative for some reason. With libevent, this happens to s2s connection stats, with select, it happens to c2s.

  2. Zash on

    Looks like server_event calls ondisconnect but not onconnect for failed connection attempts, while server_select calls onconnect even if the connection fails...

  3. MattJ on

    The server_event behaviour is what was intended.

  4. Zash on

    Fixed in http://hg.prosody.im/0.10/rev/32327c80710b for the server_select issue.

    Changes
    • tag Status-Started
  5. Zash on

    There's still the select+c2s issue.

  6. Zash on

    Changes
    • title statsmanager / util.statistics acting weird server_select and server_event call different callbacks on connection failure
  7. Zash on

    Test: server.addclient( some host, some port not being listened to, listener, ... ) Expect: something, then listener.ondisconnect(conn, "connection refused") On server_select, see: listener.onconnect() listener.ondrain() listener.ondisconnect() On server_event, see: listener.onconnect() listener.ondisconnect()

  8. Zash on

    Test: server.addclient( black hole, ... ) Expect: listener.ontimeout() listener.ondisconnect() On server_select, see: listener.onconnect() listener.ondrain() listener.onincoming() listener.ondisconnect(conn, "closed") On server_event, see: listener.ontimeout() listener.ondisconnect()

  9. Zash on

    Changes
    • owner Zash

New comment