lib/protocol, rc, utils: Add mutex Unlock before panic (#6556)
This commit is contained in:
@@ -251,6 +251,7 @@ func (s *service) Stop() {
|
||||
s.mut.Lock()
|
||||
select {
|
||||
case <-s.ctx.Done():
|
||||
s.mut.Unlock()
|
||||
panic(fmt.Sprintf("Stop called more than once on %v", s))
|
||||
default:
|
||||
s.cancel()
|
||||
|
||||
Reference in New Issue
Block a user