Error code: 80017 - Connection closed

This error can occur when a connection has been closed due to some circumstances and then for example a channel or presence method e.g. channel.presence.update being called on the connection when the connection is still in the closed state.

Make sure you are doing a check on the connection state of the client before to avoid this error.