Skip to content

Commit

Permalink
Remove the capture of pending when having a consumer already exist error
Browse files Browse the repository at this point in the history
Should be done really only when the library successfully created
the consumer.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
  • Loading branch information
kozlovic committed Feb 9, 2022
1 parent 3ad1952 commit 7d7a4fe
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion js.go
Expand Up @@ -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.
Expand Down

0 comments on commit 7d7a4fe

Please sign in to comment.