[TIMOB-9608] MobileWeb: Ti.Network.HTTPClient aborts when making async request
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-06-18T09:57:48.000+0000 |
| Affected Version/s | Release 2.1.0 |
| Fix Version/s | Release 2.1.0, Sprint 2012-13 MW |
| Components | MobileWeb |
| Labels | n/a |
| Reporter | Jeff English |
| Assignee | Chris Barber |
| Created | 2012-06-18T08:54:31.000+0000 |
| Updated | 2017-03-04T00:10:54.000+0000 |
Description
When making an asynchronous HTTP request, the request aborts immediately after the 'send' call. The reason is that the setTimeout call is not setting a timeout value due to incorrect parenthesis. At line 115 in HTTPClient.js, the following code:
timeout && (this._timeoutTimer = setTimeout(lang.hitch(this, function() {
if (this.connected) {
this.abort();
!this._completed && this._onError("Request timed out");
}
}, timeout)));
should be
timeout && (this._timeoutTimer = setTimeout(lang.hitch(this, function() {
if (this.connected) {
this.abort();
!this._completed && this._onError("Request timed out");
}
}), timeout));
[Notice the change in the closing parentheses]
Pull request: https://github.com/appcelerator/titanium_mobile/pull/2417
Closing ticket due to MobileWeb no longer being supported.