Skip to content

Commit

Permalink
node: return an error when node.startRPC returns one
Browse files Browse the repository at this point in the history
Errors returned from this function were getting
ignored, resulting in silent-but-deadly
startup errors, especially around authrpc,
which is a relatively new addition,
and the port collision of which causes
a lot of people a lot of headaches.

Date: 2023-11-01 07:51:52-06:00
Signed-off-by: meows <[email protected]>
  • Loading branch information
meowsbits committed Nov 1, 2023
1 parent 9f52cc5 commit 2713495
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,10 @@ func (n *Node) openEndpoints() error {
// start RPC endpoints
err := n.startRPC()
if err != nil {
log.Error("Failed to open RPC endpoints", "error", err)
n.stopRPC()
n.server.Stop()
return err
}
err = n.setupOpenRPC()
return err
Expand Down

0 comments on commit 2713495

Please sign in to comment.