From 8a470748278aa3231d4ee617627bf734b96c1085 Mon Sep 17 00:00:00 2001 From: EclesioMeloJunior Date: Thu, 26 May 2022 15:09:56 -0400 Subject: [PATCH] chore: smooth diffs --- dot/rpc/subscription/websocket.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dot/rpc/subscription/websocket.go b/dot/rpc/subscription/websocket.go index cefa30cdcea..4418e564970 100644 --- a/dot/rpc/subscription/websocket.go +++ b/dot/rpc/subscription/websocket.go @@ -83,12 +83,14 @@ func (c *WSConn) HandleConn() { } logger.Tracef("websocket message received: %s", string(rawBytes)) + if wsMessage.Method == "" { c.safeSendError(0, big.NewInt(InvalidRequestCode), InvalidRequestMessage) continue } logger.Debugf("ws method %s called with params %v", wsMessage.Method, wsMessage.Params) + if !strings.Contains(wsMessage.Method, "_unsubscribe") && !strings.Contains(wsMessage.Method, "_unwatch") { setupListener := c.getSetupListener(wsMessage.Method)