80002: Connection suspended

connection_suspended

The connection moved to the suspended state after being disconnected for an extended period. A connection becomes suspended once it has been disconnected for around two minutes, beyond which its state can no longer be recovered.

What you should do

Usually nothing, since the SDK keeps trying to reconnect from the suspended state on its own. To see why the connection dropped, read the reason on the connection state change event the SDK emits. When it reconnects, channels are re-attached automatically, but messages published while it was suspended are not replayed, so use the history API to catch up on any you need.

Why it happens

The connection was disconnected for around two minutes without recovering, so it moved from disconnected to suspended. This is usually a prolonged network interruption between the client and Ably rather than a fault in the request.

What you'll see

The error is reported with code 80002 and HTTP status 400. The message is typically Connection to server unavailable.