Merge pull request #3886 from nats-io/process-connect-fix-main

Check if connection name was already set when storing it
This commit is contained in:
Derek Collison
2023-02-19 09:45:17 -07:00
committed by GitHub

View File

@@ -1801,7 +1801,7 @@ func (c *client) processConnect(arg []byte) error {
}
}
if ncs != _EMPTY_ {
c.ncs.Store(fmt.Sprintf("%s - %q", c, ncs))
c.ncs.CompareAndSwap(nil, fmt.Sprintf("%s - %q", c, ncs))
}
}