From 18e11359af25cb335b166610655e1a3226fabe87 Mon Sep 17 00:00:00 2001 From: StephenButtolph Date: Tue, 2 Jun 2020 15:26:30 -0400 Subject: [PATCH] returned dispatch error from the node --- main/main.go | 5 +++-- node/node.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/main/main.go b/main/main.go index 574aa1b..53cade3 100644 --- a/main/main.go +++ b/main/main.go @@ -81,6 +81,7 @@ func main() { defer node.Shutdown() - log.Debug("Dispatching node handlers") - node.Dispatch() + log.Debug("dispatching node handlers") + err = node.Dispatch() + log.Debug("node dispatching returned with %s", err) } diff --git a/node/node.go b/node/node.go index 1408fec..0922b24 100644 --- a/node/node.go +++ b/node/node.go @@ -195,7 +195,7 @@ func (i *insecureValidatorManager) Disconnected(vdrID ids.ShortID) bool { // Dispatch starts the node's servers. // Returns when the node exits. -func (n *Node) Dispatch() { +func (n *Node) Dispatch() error { // Add bootstrap nodes to the peer network for _, peer := range n.Config.BootstrapPeers { if !peer.IP.Equal(n.Config.StakingIP) { @@ -205,7 +205,7 @@ func (n *Node) Dispatch() { } } - n.Net.Dispatch() + return n.Net.Dispatch() } /*