mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Move server running state to atomic to avoid contention at NRG layer.
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1220,7 +1220,7 @@ func (s *Server) createWSClient(conn net.Conn, ws *websocket) *client {
|
||||
c.mu.Unlock()
|
||||
|
||||
s.mu.Lock()
|
||||
if !s.running || s.ldm {
|
||||
if !s.isRunning() || s.ldm {
|
||||
if s.shutdown {
|
||||
conn.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user