diff options
Diffstat (limited to 'whisper/message.go')
-rw-r--r-- | whisper/message.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/whisper/message.go b/whisper/message.go index db0110b4a..bbad8e6a3 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -67,7 +67,11 @@ func (self *Message) Seal(pow time.Duration, opts Opts) (*Envelope, error) { } } - envelope := NewEnvelope(DefaultTtl, opts.Topics, self) + if opts.Ttl == 0 { + opts.Ttl = DefaultTtl + } + + envelope := NewEnvelope(opts.Ttl, opts.Topics, self) envelope.Seal(pow) return envelope, nil |