From dff7fba40a5ca4301ecd560d5232c9fe64843148 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Tue, 18 Jun 2019 19:38:20 -0700 Subject: [PATCH] server: properly set stopping atomic var upon shutdown --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index b0c2350f..900e6d62 100644 --- a/server.go +++ b/server.go @@ -1298,7 +1298,7 @@ func (s *server) Start() error { // NOTE: This function is safe for concurrent access. func (s *server) Stop() error { s.stop.Do(func() { - atomic.LoadInt32(&s.stopping) + atomic.StoreInt32(&s.stopping, 1) close(s.quit)