diff --git a/cmd.go b/cmd.go index cc97966..d4af1a3 100644 --- a/cmd.go +++ b/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) } } }()