mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
avoid one more crash
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user