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
// 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)
}
}
}()