Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
on peer shutdown, clear all errors
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari committed Feb 28, 2024
1 parent b218cbe commit fcb7b15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions peer_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ func (c *PeerClient) Shutdown(ctx context.Context) error {
defer c.wgMutex.Unlock()
c.wg.Wait()

// clear errors
c.lastErrs = collections.NewLRUCache(100)

// signal that no more items will be sent
c.queueClosed.Store(true)
close(c.queue)
Expand Down

0 comments on commit fcb7b15

Please sign in to comment.