Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
desperatee committed Nov 11, 2024
1 parent 8d11b72 commit 871cb21
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rpc/ws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ func (c *Client) subscribe(
c.conn.SetWriteDeadline(time.Now().Add(writeWait))
err = c.conn.WriteMessage(websocket.TextMessage, data)
if err != nil {
delete(c.subscriptionByRequestID, req.ID)
return nil, fmt.Errorf("unable to write request: %w", err)
}

Expand Down

0 comments on commit 871cb21

Please sign in to comment.