Skip to content

Commit

Permalink
memory leak in ws client (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
SC4RECOIN authored Oct 10, 2024
1 parent d337fef commit 05e94f2
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 @@ -341,6 +341,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 05e94f2

Please sign in to comment.