Skip to content

Commit

Permalink
fix: remove deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Ghangas committed Jul 24, 2021
1 parent dbde36d commit ae4686e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dht/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (table *InMemTable) HandleExpired(peerID id.Signatory) bool {
expired := (time.Now().Sub(expiry.timestamp)) > expiry.minimumExpiryAge
if expired {
table.DeletePeer(peerID)
table.DeleteExpiry(peerID)
delete(table.expiryBySignatory, peerID)
}
return expired
}
Expand Down

0 comments on commit ae4686e

Please sign in to comment.