[TIMOB-3144] Android: allow timeout value to be set per http client instance
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:01:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M10 |
Components | Android |
Labels | android, defect, httpclient, regression, release-1.6.0, reported-1.6.0, timeout |
Reporter | Opie Cyrus |
Assignee | Opie Cyrus |
Created | 2011-04-15T03:38:00.000+0000 |
Updated | 2011-04-17T02:01:02.000+0000 |
Description
Now that the http client is shared, modify the http client to allow for a unique timeout per instance.
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:38:00.000+0000 | 2424 |
(from [ccc3a3073f757c32053e9dd8eb596b58a30001ca]) [#3144 state:fixed-in-qa] [#3118 state:fixed-in-qa] modify http client to release stale connections
sometimes http client does not correctly release stale connections when exceptions are thrown or certain responses are received (304) in this case. upon receiving exception, manually release any idle or expired connections. also modified http client to respect unique timeout values per TiHTTPClient instance rather than setting the timeout value on the shared http client instance.
https://github.com/appcelerator/titanium_mobile/commit/ccc3a3073f757c32053e9dd8eb596b58a30001ca"> https://github.com/appcelerator/titanium_mobile/commit/ccc3a3073f75...
(from [b9a4f2cec1823d7d6842baf7f59a1e4cf81458ad]) [#3144 state:fixed-in-qa] [#3118 state:fixed-in-qa] modify http client to release stale connections
sometimes http client does not correctly release stale connections when exceptions are thrown or certain responses are received (304) in this case. upon receiving exception, manually release any idle or expired connections. also modified http client to respect unique timeout values per TiHTTPClient instance rather than setting the timeout value on the shared http client instance.
(cherry picked from commit ccc3a3073f757c32053e9dd8eb596b58a30001ca) https://github.com/appcelerator/titanium_mobile/commit/b9a4f2cec1823d7d6842baf7f59a1e4cf81458ad"> https://github.com/appcelerator/titanium_mobile/commit/b9a4f2cec182...
Please verify with attached test app. Basically, whenever you click the button on the first tab, you should fire off two requests. One request has a 500 millisecond timeout which should fail and the other has a 40 second timeout which should work without issue.
GA - 1.6 G! and 2.3.1 Nexus s