Just exit if we cannot start the listener
This commit is contained in:
parent
9094bcde02
commit
de76220c6b
1 changed files with 3 additions and 4 deletions
7
cmd.go
7
cmd.go
|
@ -650,10 +650,9 @@ func main() {
|
|||
// Start HTTP server to listen and send messages to frontend and btcd
|
||||
// backend. Try reconnection if connection failed.
|
||||
for {
|
||||
if err := FrontendListenAndServe(); err == ErrConnRefused {
|
||||
// wait and try again.
|
||||
log.Info("Unable to start frontend HTTP server. Retrying in 5 seconds.")
|
||||
time.Sleep(5 * time.Second)
|
||||
if err := FrontendListenAndServe(); err != nil {
|
||||
log.Info("Unable to start frontend HTTP server: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue