avoid one more crash

This commit is contained in:
Radu Ioan Fericean
2012-07-30 14:06:02 +03:00
parent 892b02e6a0
commit 0fa83723b4
2 changed files with 6 additions and 1 deletions

View File

@@ -128,6 +128,11 @@ func readConfig(configFn string) {
func listenToRPCRequests(rpcResponder interface{}, rpcAddress string, rpc_encoding string) {
l, err := net.Listen("tcp", rpcAddress)
if err != nil {
timespans.Logger.Err(fmt.Sprintf("could not connect to %v: %v", rpcAddress, err))
exitChan <- true
return
}
defer l.Close()
if err != nil {

View File

@@ -82,7 +82,7 @@ Connects to the balancer and rehisters the rater to the server.
func registerToBalancer() {
client, err := rpc.Dial("tcp", rater_balancer)
if err != nil {
log.Print("Cannot contact the balancer!")
log.Print("Cannot contact the balancer!", err)
exitChan <- true
return
}