Just exit if we cannot start the listener

This commit is contained in:
David Hill 2013-10-29 23:53:20 -04:00
parent 9094bcde02
commit de76220c6b

7
cmd.go
View file

@ -650,10 +650,9 @@ func main() {
// Start HTTP server to listen and send messages to frontend and btcd // Start HTTP server to listen and send messages to frontend and btcd
// backend. Try reconnection if connection failed. // backend. Try reconnection if connection failed.
for { for {
if err := FrontendListenAndServe(); err == ErrConnRefused { if err := FrontendListenAndServe(); err != nil {
// wait and try again. log.Info("Unable to start frontend HTTP server: %v", err)
log.Info("Unable to start frontend HTTP server. Retrying in 5 seconds.") os.Exit(1)
time.Sleep(5 * time.Second)
} }
} }
}() }()