mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 13:47:19 +00:00
consensus: make double-call to Shutdown a no-op
This commit is contained in:
parent
2f55070a57
commit
cd4f46247d
1 changed files with 1 additions and 1 deletions
|
@ -274,7 +274,7 @@ func (s *service) Start() {
|
|||
|
||||
// Shutdown implements the Service interface.
|
||||
func (s *service) Shutdown() {
|
||||
if s.started.Load() {
|
||||
if s.started.CAS(true, false) {
|
||||
close(s.quit)
|
||||
<-s.finished
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue