From 502d98953e82a26721d8743761646f2aa21bcd28 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 25 Sep 2018 10:08:48 +0300 Subject: [PATCH] Apply part of the watchdog change to status-go whisper module --- whisperv6/peer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/whisperv6/peer.go b/whisperv6/peer.go index eb17d2d..2b7687e 100644 --- a/whisperv6/peer.go +++ b/whisperv6/peer.go @@ -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 {