Skip to content

Commit

Permalink
reset failure count after successful broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Apr 29, 2024
1 parent c59ee38 commit 7766c82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/host/p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ func (p *Service) broadcast(msg message) error {
}
}
p.peerAddressesMutex.Unlock()
} else {
// if message was sent successfully, reset failure count
p.peerAddressesMutex.Lock()
p.peerAddresses[closureAddr] = 0
p.peerAddressesMutex.Unlock()
}
}()
}
Expand Down

0 comments on commit 7766c82

Please sign in to comment.