diff options
Diffstat (limited to 'whisper/whisperv6/whisper.go')
-rw-r--r-- | whisper/whisperv6/whisper.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/whisper/whisperv6/whisper.go b/whisper/whisperv6/whisper.go index e0ed00bb5..b0b601f03 100644 --- a/whisper/whisperv6/whisper.go +++ b/whisper/whisperv6/whisper.go @@ -590,10 +590,7 @@ func (whisper *Whisper) Unsubscribe(id string) error { // network in the coming cycles. func (whisper *Whisper) Send(envelope *Envelope) error { ok, err := whisper.add(envelope, false) - if err != nil { - return err - } - if !ok { + if err == nil && !ok { return fmt.Errorf("failed to add envelope") } return err |