summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/http/service.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/service/http/service.go b/service/http/service.go
index f171e48e..cef019b3 100644
--- a/service/http/service.go
+++ b/service/http/service.go
@@ -97,6 +97,11 @@ func (s *Service) Serve() error {
// Stop stops the svc.
func (s *Service) Stop() {
+ if atomic.LoadInt32(&s.stopping) != 0 {
+ // already stopping
+ return
+ }
+
s.mu.Lock()
defer s.mu.Unlock()
if s.http == nil {