Stop privVal socket client on node shutdown

This commit is contained in:
Alexander Simmerl
2018-03-06 16:11:17 +01:00
parent 25ff699425
commit ca619c80b6
3 changed files with 27 additions and 22 deletions

View File

@ -441,8 +441,13 @@ func (n *Node) OnStop() {
}
n.eventBus.Stop()
n.indexerService.Stop()
if pvsc, ok := n.privValidator.(*priv_val.SocketClient); ok {
if err := pvsc.Stop(); err != nil {
n.Logger.Error("Error stopping priv validator socket client", "err", err)
}
}
}
// RunForever waits for an interrupt signal and stops the node.