Use ConnectMessageHandler to handle onClose/onDisconnect