Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRangiCrew committed Oct 29, 2024
1 parent 7c3f009 commit b53a45e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/connection/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,17 @@ func (ws *WebSocketConnection) handleResponse(res []byte) {
if rpcRes.Error != nil {
err := fmt.Errorf("rpc request err %w", rpcRes.Error)
ws.logger.Error(err.Error())

errChan, ok := ws.getErrorChannel(fmt.Sprintf("%v", rpcRes.ID))
if !ok {
err := fmt.Errorf("unavailable ErrorChannel %+v", rpcRes.ID)
ws.logger.Error(err.Error())
return
}

defer close(errChan)
errChan <- rpcRes.Error

return
}

Expand Down

0 comments on commit b53a45e

Please sign in to comment.