mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 08:08:45 +05:00
Update rpcclient revising error handling
This commit is contained in:
committed by
Dan Christian Bogos
parent
79f824c575
commit
ac96e53c43
@@ -158,7 +158,7 @@ func (cM *ConnManager) Call(ctx *context.Context, connIDs []string,
|
||||
if conn, err = cM.getConn(ctx, connID); err != nil {
|
||||
continue
|
||||
}
|
||||
if err = conn.Call(ctx, method, arg, reply); !rpcclient.IsNetworkError(err) {
|
||||
if err = conn.Call(ctx, method, arg, reply); !rpcclient.IsConnectionErr(err) && !rpcclient.IsServiceErr(err) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func (cM *ConnManager) CallWithConnIDs(connIDs []string, ctx *context.Context, s
|
||||
if conn, err = cM.getConnWithConfig(ctx, connID, newCfg, nil, false); err != nil {
|
||||
continue
|
||||
}
|
||||
if err = conn.Call(ctx, method, arg, reply); !rpcclient.IsNetworkError(err) {
|
||||
if err = conn.Call(ctx, method, arg, reply); !rpcclient.IsConnectionErr(err) && !rpcclient.IsServiceErr(err) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user