mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fix race in consumer create (#4377)
This fixes the race condition in consumer create API by adding a missing return statement, probably introduced while solving conflicts. Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
This commit is contained in:
@@ -6897,6 +6897,7 @@ func (s *Server) jsClusteredConsumerRequest(ci *ClientInfo, acc *Account, subjec
|
||||
if action == ActionCreate && !reflect.DeepEqual(cfg, ca.Config) {
|
||||
resp.Error = NewJSConsumerAlreadyExistsError()
|
||||
s.sendAPIErrResponse(ci, acc, subject, reply, string(rmsg), s.jsonResponse(&resp))
|
||||
return
|
||||
}
|
||||
// Do quick sanity check on new cfg to prevent here if possible.
|
||||
if err := acc.checkNewConsumerConfig(ca.Config, cfg); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user