Skip to content

Commit

Permalink
chore: smooth diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed May 26, 2022
1 parent 226c7df commit 8a47074
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dot/rpc/subscription/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8a47074

Please sign in to comment.