Skip to content

Commit

Permalink
fix: align wait time to aggregated backoff
Browse files Browse the repository at this point in the history
  • Loading branch information
mindhells committed Jan 31, 2025
1 parent d3fd4b2 commit 15829ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/middleware/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (m *MiddlwareManager) Start() {

// wait for ready up to 12 seconds (including retries)
// to handle service discontinuity (external middlewares) or startup order
ctxTimeout, cancelTimeout := context.WithTimeout(context.Background(), 12*time.Second)
ctxTimeout, cancelTimeout := context.WithTimeout(context.Background(), 31*time.Second)
handleData, err := client.Handle(ctxTimeout, &proto.Data{
Body: message.Body,
}, grpc.WaitForReady(true))
Expand Down
2 changes: 1 addition & 1 deletion pkg/middleware/unimplemented.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type UnimplementedMiddleware struct {
func (b *UnimplementedMiddleware) Next(req *proto.Data) (*proto.Data, error) {
if b.client != nil {
klog.V(0).Info("processing next middleware")
ctxTimeout, cancelTimeout := context.WithTimeout(context.Background(), 12*time.Second)
ctxTimeout, cancelTimeout := context.WithTimeout(context.Background(), 31*time.Second)
nextResp, err := (*b.client).Handle(ctxTimeout, req, grpc.WaitForReady(true))
cancelTimeout()
if err != nil {
Expand Down

0 comments on commit 15829ce

Please sign in to comment.