mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update rpcclient revising error handling
This commit is contained in:
committed by
Dan Christian Bogos
parent
7a7b928aa0
commit
8269e0b99c
@@ -191,7 +191,7 @@ func (cM *ConnManager) CallWithConnIDs(connIDs []string, subsHostIDs utils.Strin
|
||||
if conn, err = cM.getConnWithConfig(connID, newCfg, nil, nil, false); err != nil {
|
||||
continue
|
||||
}
|
||||
if err = conn.Call(context.TODO(), method, arg, reply); !rpcclient.IsNetworkError(err) {
|
||||
if err = conn.Call(context.TODO(), method, arg, reply); !rpcclient.IsConnectionErr(err) && !rpcclient.IsServiceErr(err) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
6
go.mod
6
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/cgrates/cgrates
|
||||
|
||||
go 1.22
|
||||
go 1.22.4
|
||||
|
||||
// replace github.com/cgrates/radigo => /home/dan/go/src/github.com/cgrates/radigo
|
||||
// replace github.com/cgrates/rpcclient => ../rpcclient
|
||||
@@ -16,7 +16,7 @@ require (
|
||||
github.com/cgrates/kamevapi v0.0.0-20220525160402-5b8036487a6c
|
||||
github.com/cgrates/ltcache v0.0.0-20210405185848-da943e80c1ab
|
||||
github.com/cgrates/radigo v0.0.0-20210902121842-ea2f9a730627
|
||||
github.com/cgrates/rpcclient v0.0.0-20230605090759-8bb5188b73e5
|
||||
github.com/cgrates/rpcclient v0.0.0-20240628101047-cb29aae6b006
|
||||
github.com/creack/pty v1.1.18
|
||||
github.com/fiorix/go-diameter v3.0.3-0.20190716165154-f4823472d0e0+incompatible
|
||||
github.com/fsnotify/fsnotify v1.6.0
|
||||
@@ -43,7 +43,7 @@ require (
|
||||
cloud.google.com/go/compute v1.23.1 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
github.com/antchfx/xpath v1.2.4 // indirect
|
||||
github.com/cenkalti/hub v1.0.1 // indirect
|
||||
github.com/cenkalti/hub v1.0.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
|
||||
8
go.sum
8
go.sum
@@ -14,10 +14,10 @@ github.com/antchfx/xpath v1.2.4 h1:dW1HB/JxKvGtJ9WyVGJ0sIoEcqftV3SqIstujI+B9XY=
|
||||
github.com/antchfx/xpath v1.2.4/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
|
||||
github.com/aws/aws-sdk-go v1.45.26 h1:PJ2NJNY5N/yeobLYe1Y+xLdavBi67ZI8gvph6ftwVCg=
|
||||
github.com/aws/aws-sdk-go v1.45.26/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/cenk/hub v1.0.1 h1:RBwXNOF4a8KjD8BJ08XqN8KbrqaGiQLDrgvUGJSHuPA=
|
||||
github.com/cenk/hub v1.0.1/go.mod h1:rJM1LNAW0ppT8FMMuPK6c2NP/R2nH/UthtuRySSaf6Y=
|
||||
github.com/cenkalti/hub v1.0.1 h1:UMtjc6dHSaOQTO15SVA50MBIR9zQwvsukQupDrkIRtg=
|
||||
github.com/cenkalti/hub v1.0.1/go.mod h1:tcYwtS3a2d9NO/0xDXVJWx3IedurUjYCqFCmpi0lpHs=
|
||||
github.com/cenkalti/hub v1.0.2 h1:Nqv9TNaA9boeO2wQFW8o87BY3zKthtnzXmWGmJqhAV8=
|
||||
github.com/cenkalti/hub v1.0.2/go.mod h1:8LAFAZcCasb83vfxatMUnZHRoQcffho2ELpHb+kaTJU=
|
||||
github.com/cenkalti/rpc2 v0.0.0-20210604223624-c1acbc6ec984 h1:CNwZyGS6KpfaOWbh2yLkSy3rSTUh3jub9CzpFpP6PVQ=
|
||||
github.com/cenkalti/rpc2 v0.0.0-20210604223624-c1acbc6ec984/go.mod h1:v2npkhrXyk5BCnkNIiPdRI23Uq6uWPUQGL2hnRcRr/M=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
@@ -33,8 +33,8 @@ github.com/cgrates/ltcache v0.0.0-20210405185848-da943e80c1ab h1:dKdAUwrij6vYwew
|
||||
github.com/cgrates/ltcache v0.0.0-20210405185848-da943e80c1ab/go.mod h1:9oSG/6gUoab/vKm/eQ3QcX6KeTR0wRw88N33iCnC/k4=
|
||||
github.com/cgrates/radigo v0.0.0-20210902121842-ea2f9a730627 h1:foxHlpQxYj15khhlpbj+EiIM/W9Gk0HP800NQ/DVPpU=
|
||||
github.com/cgrates/radigo v0.0.0-20210902121842-ea2f9a730627/go.mod h1:PizDxlLTjVQpyPU0ksWYfmM9UbYGu7q6at0nzuiZprI=
|
||||
github.com/cgrates/rpcclient v0.0.0-20230605090759-8bb5188b73e5 h1:GhA5qBUK7o0j+7fi1GACKnT454pv/LfCjoI52vFIz3E=
|
||||
github.com/cgrates/rpcclient v0.0.0-20230605090759-8bb5188b73e5/go.mod h1:tDqS6BieViKYpz696//gxseUN1b92hPHqk+w0CzY8AE=
|
||||
github.com/cgrates/rpcclient v0.0.0-20240628101047-cb29aae6b006 h1:HxmDpmCesrwbi+ag/4+PDRhuSy0gpemMRQ19fAWmDTE=
|
||||
github.com/cgrates/rpcclient v0.0.0-20240628101047-cb29aae6b006/go.mod h1:WxTEIJvgI4c3eiPWW0WeAhHGd49Oi1Voe9lahotJiNo=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
|
||||
|
||||
Reference in New Issue
Block a user