Skip to content

Conversation

rggardner
Copy link
Contributor

...oes not correctly fire. The asyncresult of the request is correctly passed into the SetTimeout method after creation but when it progresses to the response object the SetTimeout is neglected.

This has previously been discussed on the google groups

https://groups.google.com/forum/#!topic/restsharp/SMl7sBN72xE

This allows for a scenario where a put request can begin and if an error occurs in the response the client can remain unaware as the timeout is not called and therefore the callback never completes. I have seen this behaviour on a mobile device where the connection is dropped during a PUT request that takes a few seconds to return.

I have included two tests. One displaying the correct timeout behaviour for a GET request and one displaying the incorrect behaviour of a PUT (with content). Adding the additional SetTimeout to the async call appears to produce the same timeout behaviour n both calls.

Ross Gardner and others added 3 commits January 31, 2014 17:07
…t does not correctly fire. The asyncresult of the request is correctly passed into the SetTimeout method after creation but when it progresses to the response object the SetTimeout is neglected.

This allows for a scenario where a put request can begin and if an error occurs in the response the client can remain unaware as the timeout is not called and therefore the callback never completes.  I have seen this behaviour on a mobile device where the connection is dropped during a PUT request that takes a few seconds to return.
Fixed indentation
Fixed indentation
haacked added a commit that referenced this pull request Feb 3, 2014
It appears possible for a PUT request to enter a state where a timeout d...
@haacked haacked merged commit 821153d into restsharp:master Feb 3, 2014
@haacked
Copy link
Contributor

haacked commented Feb 3, 2014

Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants