[#1291] innerring: Don't stop the same listener twice
When IR node configured without main chain, both `morphListener` and `mainnetListener` are pointing into single listener component. We should not call `Stop()` twice, because it may trigger channel closing in neo-go or other components and it can throw panic. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
d311585de6
commit
77f4a5844b
1 changed files with 3 additions and 1 deletions
|
@ -282,7 +282,9 @@ func (s *Server) Stop() {
|
|||
s.setHealthStatus(control.HealthStatus_SHUTTING_DOWN)
|
||||
|
||||
go s.morphListener.Stop()
|
||||
if !s.withoutMainNet {
|
||||
go s.mainnetListener.Stop()
|
||||
}
|
||||
|
||||
for _, c := range s.closers {
|
||||
if err := c(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue