Half-open connections lead to temporarily incorrect connection counts, online presence users and WebHook call delays.

In the majority of situations the Pusher servers can detect connections that have been closed by clients. However, in some cases Half-open TCP connections can occur.

To deal with half-open connection we have have ping/pong mechanisms

  • The Pusher server takes advantage of clients that support the WebSocket ping and pong control frames
  • For clients that don't natively support ping/pong we have our mechanism within the Pusher Protocol

Unfortunately, to cover the detection of these silent, unclean disconnections in anything which could be labelled "real-time" would mean passing constant traffic between client and server. Therefore in these case of half-open connections there can be a delay in the time between a client disconnects and the Pusher servers noticing this.

This can have the following consequences until the half-open connection is detected by the ping/pong mechanism:

  • Connection statistics may be temporarily incorrect
  • User count on presence channels can be temporarily incorrect member_removed events won't be triggered until the disconnect is detected
  • Presence and Channel Occupancy WebHooks will be delayed
Was this article helpful?
0 out of 0 found this helpful
Haven't found what you were looking for?
Submit a ticket