Projects tigase _server server-core Issues #1467
Dead connection detection: whitespace keepalive character should not be used for WS (#1467)
Unknown opened 3 years ago

Describe the bug

According to https://datatracker.ietf.org/doc/html/rfc7395#section-3.8

whitespace keepalives are not allowed with Websocket connection

But Tigase still provides an option to do so https://github.com/tigase/tigase-server/blob/master/src/main/java/tigase/server/ConnectionManager.java#L1485

which may lead to crashes in clients XMPP libs , e.g. https://github.com/xmppjs/xmpp.js/issues/942

To Reproduce Steps to reproduce the behavior:

  1. create a nodejs client with xmppjs lib
  2. connect to Tigase server
  3. wait 30 mins until the crash occur

Impact Tigase starts but the default behaviour of a 'dead connection detection function' can lead to random crashes at clients side

Expected behavior To have a more artificial logic in Tigase, e.g. send whitespace chars for non WS and ping for WS clients

Unknown commented 3 years ago

After docs investigation, I found a possible workaround

probably we can set different 'watchdog_ping_type' settings for diff components, e.g. for 'ws2s' to override it and set it to 'xmpp'

ws2s/watchdog_ping_type=xmpp 

Is this a correct way to cope with it?

Unknown commented 3 years ago

Hi, thank you for reporting it. Yes, it's possible to configure it either globally or per-connection-manager as you found out. We will change the default from whitespace and include additional warning if someone would use whitespace for websocket.

(ref #server-1318)

Unknown commented 3 years ago

Changed default type from whitespace to xmpp, add warning if someone would override it by configuration.

issue 1 of 1
Type
Bug
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1467
Please wait...
Page is in error, reload to recover