Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3144] Android: allow timeout value to be set per http client instance

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:01:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M10
ComponentsAndroid
Labelsandroid, defect, httpclient, regression, release-1.6.0, reported-1.6.0, timeout
ReporterOpie Cyrus
AssigneeOpie Cyrus
Created2011-04-15T03:38:00.000+0000
Updated2011-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

FileDateSize
app.js2011-04-15T03:38:00.000+00002424

Comments

  1. Opie Cyrus 2011-04-15

    (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...

  2. Opie Cyrus 2011-04-15

    (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...

  3. Opie Cyrus 2011-04-15

    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.

  4. Thomas Huelbert 2011-04-15

    GA - 1.6 G! and 2.3.1 Nexus s

JSON Source