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:
@@ -1222,9 +1222,7 @@ func TestServerValidateGatewaysOptions(t *testing.T) {
|
||||
func TestAcceptError(t *testing.T) {
|
||||
o := DefaultOptions()
|
||||
s := New(o)
|
||||
s.mu.Lock()
|
||||
s.running = true
|
||||
s.mu.Unlock()
|
||||
s.running.Store(true)
|
||||
defer s.Shutdown()
|
||||
orgDelay := time.Hour
|
||||
delay := s.acceptError("Test", fmt.Errorf("any error"), orgDelay)
|
||||
|
||||
Reference in New Issue
Block a user