diff --git a/Core Modules/WalletConnectSharp.Network.Websocket/WebsocketConnection.cs b/Core Modules/WalletConnectSharp.Network.Websocket/WebsocketConnection.cs index 21e3d2d..ea819b7 100644 --- a/Core Modules/WalletConnectSharp.Network.Websocket/WebsocketConnection.cs +++ b/Core Modules/WalletConnectSharp.Network.Websocket/WebsocketConnection.cs @@ -180,6 +180,9 @@ private async Task Register(string url) private void OnOpen(WebsocketClient socket) { + if (socket == null) + return; + socket.MessageReceived.Subscribe(OnPayload); socket.DisconnectionHappened.Subscribe(OnDisconnect);