-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Fixes #2044] Implement an equivalent to AsyncTimeOutAttribute #2083
Conversation
/// <param name="duration">The duration in milliseconds.</param> | ||
public AsyncTimeoutAttribute(int duration) | ||
{ | ||
if (duration < -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
< 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah...my bad...I copy pasted this code from MVC 5 where we seem to honor Timeout.Infinite(whose value is -1)...not sure what is the realistic scenario where this makes sense..
441ffe8
to
e89318d
Compare
@Eilon, @rynowak, @GrabYourPitchforks: The latest commit has some major updates after some additional feedback from Levi and Ryan. Please take a look. |
Assuming this is @GrabYourPitchforks -approved, then |
This code doesn't address the basic scenario of cancelling operations not written by the user. |
@yishaigalatzer : Just FYI...following was the discussion that came up yesterday that drove the latest update's design change:
If we consider to honor the above mentioned scenario, not sure if we should be cancelling operations not written by the user...like even this could lead to corruption in state... Just FYI...the /cc: @GrabYourPitchforks |
…d also added functional tests now.
e89318d
to
253cf22
Compare
FYI, per our discussion Friday afternoon I believe this feature was killed. |
indeed. We'll bring it back in a future update. |
Sure..closing this PR now..thanks.. |
So currently there is not way to provide set timeout for async request? |
@yishaigalatzer @rynowak @GrabYourPitchforks @Tratcher
Please note:
This PR does not functional tests as HttpContext's Abort method doesn't work as expected(I get an OK response with no body) with in-memory host. I have manually verified timeout on IIS and Weblistener though.
@rynowak and I are planning to discuss with @GrabYourPitchforks to see if we could do something regarding this for in-memory scenarios. I wanted to get this PR out to get any initial comments.
Couple of interesting links regarding this: