Update rpcclient revising error handling

This commit is contained in:
arberkatellari
2024-06-28 14:05:41 +02:00
committed by Dan Christian Bogos
parent 79f824c575
commit ac96e53c43
5 changed files with 15 additions and 17 deletions

View File

@@ -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
}
}