From de76220c6b52f72edc74cb4c6e0733c6a529f50a Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 29 Oct 2013 23:53:20 -0400 Subject: [PATCH] Just exit if we cannot start the listener --- cmd.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) } } }()