mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-02-09 05:19:49 +00:00
network: discard bFetcherQueue earlier
Discard `bFetcherQueue` to avoid persisting new blocks during termination before service Shutdown. Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
df05cd2858
commit
c1ce6904c4
1 changed files with 1 additions and 1 deletions
|
@ -331,6 +331,7 @@ func (s *Server) Shutdown() {
|
|||
}
|
||||
s.log.Info("shutting down server", zap.Int("peers", s.PeerCount()))
|
||||
if s.ServerConfig.NeoFSBlockFetcherCfg.Enabled {
|
||||
s.bFetcherQueue.Discard()
|
||||
s.blockFetcher.Shutdown()
|
||||
}
|
||||
for _, tr := range s.transports {
|
||||
|
@ -341,7 +342,6 @@ func (s *Server) Shutdown() {
|
|||
}
|
||||
s.bQueue.Discard()
|
||||
s.bSyncQueue.Discard()
|
||||
s.bFetcherQueue.Discard()
|
||||
s.serviceLock.RLock()
|
||||
for _, svc := range s.services {
|
||||
svc.Shutdown()
|
||||
|
|
Loading…
Add table
Reference in a new issue