mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
Reorder of Close() calls in closePortalRpcServer
This commit is contained in:
parent
68dbb1a6b2
commit
2755aeec54
1 changed files with 4 additions and 5 deletions
|
|
@ -139,10 +139,6 @@ func handlerInterrupt(clientChan <-chan *Client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *Client) closePortalRpcServer() {
|
func (cli *Client) closePortalRpcServer() {
|
||||||
log.Info("Closing Database...")
|
|
||||||
cli.DiscV5API.DiscV5.LocalNode().Database().Close()
|
|
||||||
log.Info("Closing UDPv5 protocol...")
|
|
||||||
cli.DiscV5API.DiscV5.Close()
|
|
||||||
if cli.HistoryNetwork != nil {
|
if cli.HistoryNetwork != nil {
|
||||||
log.Info("Closing history network...")
|
log.Info("Closing history network...")
|
||||||
cli.HistoryNetwork.Stop()
|
cli.HistoryNetwork.Stop()
|
||||||
|
|
@ -155,9 +151,12 @@ func (cli *Client) closePortalRpcServer() {
|
||||||
log.Info("Closing state network...")
|
log.Info("Closing state network...")
|
||||||
cli.StateNetwork.Stop()
|
cli.StateNetwork.Stop()
|
||||||
}
|
}
|
||||||
|
log.Info("Closing Database...")
|
||||||
|
cli.DiscV5API.DiscV5.LocalNode().Database().Close()
|
||||||
|
log.Info("Closing UDPv5 protocol...")
|
||||||
|
cli.DiscV5API.DiscV5.Close()
|
||||||
log.Info("Closing servers...")
|
log.Info("Closing servers...")
|
||||||
cli.Server.Close()
|
cli.Server.Close()
|
||||||
|
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue