mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 18:20:42 -07:00
Return if pull subscriber and exists
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -4070,8 +4070,9 @@ func (s *Server) jsClusteredConsumerRequest(ci *ClientInfo, acc *Account, subjec
|
||||
} else {
|
||||
oname = cfg.Durable
|
||||
if ca := sa.consumers[oname]; ca != nil && !ca.deleted {
|
||||
isPull := ca.Config.DeliverSubject == _EMPTY_
|
||||
// This can be ok if delivery subject update.
|
||||
shouldErr := !reflect.DeepEqual(cfg, ca.Config) && !configsEqualSansDelivery(*cfg, *ca.Config) || ca.pending
|
||||
shouldErr := isPull || ca.pending || (!reflect.DeepEqual(cfg, ca.Config) && !configsEqualSansDelivery(*cfg, *ca.Config))
|
||||
if !shouldErr {
|
||||
rr := acc.sl.Match(ca.Config.DeliverSubject)
|
||||
shouldErr = len(rr.psubs)+len(rr.qsubs) != 0
|
||||
|
||||
Reference in New Issue
Block a user