Fix SIP client timeout. (#4345)

This commit is contained in:
Denys Smirnov
2026-03-05 19:09:17 +02:00
committed by GitHub
parent 52c28a938d
commit 493e87dfd4
2 changed files with 23 additions and 2 deletions
+14 -1
View File
@@ -72,7 +72,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
getIngressStore,
getIngressConfig,
NewIngressService,
rpc.NewSIPClientWithParams,
newSIPClient,
getSIPStore,
getSIPConfig,
NewSIPService,
@@ -225,6 +225,19 @@ func getIngressConfig(conf *config.Config) *config.IngressConfig {
return &conf.Ingress
}
func newSIPClient(p rpc.ClientParams) (rpc.SIPClient, error) {
// Do not pass parameters directly, as they set timeout that is too short,
// and might set retry policy that is not acceptable for SIP methods.
// Instead, set relevant parameters manually.
return rpc.NewSIPClientWithParams(rpc.ClientParams{
Bus: p.Bus,
ClientOptions: []psrpc.ClientOption{
rpc.WithClientLogger(p.Logger),
otelpsrpc.ClientOptions(otelpsrpc.Config{}),
},
})
}
func getSIPStore(s ObjectStore) SIPStore {
switch store := s.(type) {
case *RedisStore: