Skip to content

Commit

Permalink
free known inventory of peer on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
lazynina committed Oct 30, 2024
1 parent c1b6944 commit d690018
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,9 @@ func (pp *Peer) Disconnect(reason string) {

glog.V(2).Infof("Peer.Disconnect: Running Disconnect for the first time for Peer %v", pp)

// Free the cache of known inventory.
pp.knownInventory.Clear()

// Close the connection object.
pp.Conn.Close()

Expand Down

0 comments on commit d690018

Please sign in to comment.