Apply part of the watchdog change to status-go whisper module

This commit is contained in:
Dmitry 2018-09-25 10:08:48 +03:00
parent d441b04413
commit 502d98953e

View File

@ -195,6 +195,10 @@ func (peer *Peer) expire() {
// broadcast iterates over the collection of envelopes and transmits yet unknown
// ones over the network.
func (peer *Peer) broadcast() error {
if peer.peer.IsFlaky() {
log.Trace("Waiting for a peer to restore communication", "ID", peer.peer.ID())
return nil
}
envelopes := peer.host.Envelopes()
bundle := make([]*Envelope, 0, len(envelopes))
for _, envelope := range envelopes {