From 7d7a4feab60ab0b1effb451f7b2ad0d4035911cc Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Wed, 9 Feb 2022 15:46:31 -0700 Subject: [PATCH] Remove the capture of pending when having a consumer already exist error Should be done really only when the library successfully created the consumer. Signed-off-by: Ivan Kozlovic --- js.go | 1 - 1 file changed, 1 deletion(-) diff --git a/js.go b/js.go index 36d68e148..4003a1849 100644 --- a/js.go +++ b/js.go @@ -1530,7 +1530,6 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync, if err != nil { return nil, err } - jsi.pending = info.NumPending + info.Delivered.Consumer if !isPullMode { // We can't reuse the channel, so if one was passed, we need to create a new one.