diff --git a/pkg/services/oracle/oracle.go b/pkg/services/oracle/oracle.go index 1882d49d0..168ff2630 100644 --- a/pkg/services/oracle/oracle.go +++ b/pkg/services/oracle/oracle.go @@ -181,6 +181,12 @@ func (o *Oracle) Name() string { // Shutdown shutdowns Oracle. func (o *Oracle) Shutdown() { + o.respMtx.Lock() + defer o.respMtx.Unlock() + if !o.running { + return + } + o.running = false close(o.close) o.getBroadcaster().Shutdown() }