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_removedevents won't be triggered until the disconnect is detected
- Presence and Channel Occupancy WebHooks will be delayed