[#1291] listener: Stop only once

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-04-05 13:20:23 +03:00 committed by Alex Vanin
parent 77f4a5844b
commit e62e02815b
2 changed files with 9 additions and 8 deletions

View file

@ -282,9 +282,7 @@ func (s *Server) Stop() {
s.setHealthStatus(control.HealthStatus_SHUTTING_DOWN)
go s.morphListener.Stop()
if !s.withoutMainNet {
go s.mainnetListener.Stop()
}
go s.mainnetListener.Stop()
for _, c := range s.closers {
if err := c(); err != nil {