diff options
author | Vlad <gluk256@gmail.com> | 2018-02-23 21:52:25 +0800 |
---|---|---|
committer | Vlad <gluk256@gmail.com> | 2018-02-23 21:52:25 +0800 |
commit | 6919c36432226a9d86dbe4a65ed9563dd42a4e08 (patch) | |
tree | ebfae50c5cca6b9d734d7a86bfc1c0b83012993e /whisper/whisperv6/whisper.go | |
parent | b677a07d36c957c4221bae952189559ac0c70537 (diff) | |
download | go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.tar go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.tar.gz go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.tar.bz2 go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.tar.lz go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.tar.xz go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.tar.zst go-tangerine-6919c36432226a9d86dbe4a65ed9563dd42a4e08.zip |
whisper: refactoring
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 |