Skip to content

Commit

Permalink
better error for starting server so we can find what line it was
Browse files Browse the repository at this point in the history
  • Loading branch information
corylanou committed Feb 26, 2015
1 parent e2f6fc5 commit 446ae53
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/influxd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ func Run(config *Config, join, version string, logWriter *os.File) (*messaging.B
// We want to make sure we are spun up before we exit this function, so we manually listen and serve
listener, err := net.Listen("tcp", config.BrokerAddr())
if err != nil {
log.Fatal(err)
log.Fatalf("failed to listen for broker on tcp: %s ", err)
}
go func() { log.Fatal(http.Serve(listener, h)) }()
go func() {
err := http.Serve(listener, h)
if err != nil {
log.Fatalf("failed to serve broker: %s", err)
}
}()
log.Printf("broker listening on %s", config.BrokerAddr())

// have it occasionally tell a data node in the cluster to run continuous queries
Expand Down

0 comments on commit 446ae53

Please sign in to comment.