fix signal client message buffer size (#1561)

* fix signal client message buffer size

* update psrpc dep
This commit is contained in:
Paul Wells
2023-03-29 16:34:45 -07:00
committed by GitHub
parent de80f521de
commit aaab3b8ce8
3 changed files with 28 additions and 25 deletions
+10 -6
View File
@@ -31,12 +31,16 @@ type signalClient struct {
}
func NewSignalClient(nodeID livekit.NodeID, bus psrpc.MessageBus, config config.SignalRelayConfig) (SignalClient, error) {
ri := middleware.NewStreamRetryInterceptorFactory(middleware.RetryOptions{
MaxAttempts: config.MaxAttempts,
Timeout: config.Timeout,
Backoff: config.Backoff,
})
c, err := rpc.NewTypedSignalClient(nodeID, bus, psrpc.WithClientStreamInterceptors(ri))
c, err := rpc.NewTypedSignalClient(
nodeID,
bus,
psrpc.WithClientStreamInterceptors(middleware.NewStreamRetryInterceptorFactory(middleware.RetryOptions{
MaxAttempts: config.MaxAttempts,
Timeout: config.Timeout,
Backoff: config.Backoff,
})),
psrpc.WithClientChannelSize(config.StreamBufferSize),
)
if err != nil {
return nil, err
}