Check for nil chan

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2021-05-07 08:36:45 -07:00
parent 35a60289d9
commit ceb4a86d57

View File

@@ -2202,7 +2202,7 @@ func (o *consumer) deliverMsg(dsubj, subj string, hdr, msg []byte, seq, dc uint6
o.outq.send(pmsg)
// If we are ack none and mset is interest only we should make sure stream removes interest.
if ap == AckNone && mset.cfg.Retention != LimitsPolicy {
if ap == AckNone && mset.cfg.Retention != LimitsPolicy && mset.amch != nil {
mset.amch <- seq
}