You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is visible that the original context is never set to the original value if a timeout occurs. However the Retry middleware uses the message's context to ensure that the MaxElapsedTime is supported:
if r.MaxElapsedTime > 0 {
var cancel func()
ctx, cancel = context.WithTimeout(ctx, r.MaxElapsedTime)
defer cancel()
}
This means that if I have this chain Retry(Timeout(handler)), and a timeout occurs then the Retry will not be effective.
I would recommend to save the original context in Timeout and restore that in the defer function(). Or is this the expected behavior?
The text was updated successfully, but these errors were encountered:
If you take a look at the Timeout middleware:
It is visible that the original context is never set to the original value if a timeout occurs. However the Retry middleware uses the message's context to ensure that the MaxElapsedTime is supported:
This means that if I have this chain Retry(Timeout(handler)), and a timeout occurs then the Retry will not be effective.
I would recommend to save the original context in Timeout and restore that in the defer function(). Or is this the expected behavior?
The text was updated successfully, but these errors were encountered: