{ "id": "102695", "key": "TIMOB-11260", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14168", "description": "2012 Sprint 22 API", "name": "2012 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2012-11-05" }, { "id": "14274", "description": "2012 Sprint 22", "name": "2012 Sprint 22", "archived": true, "released": true, "releaseDate": "2012-11-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-29T20:28:37.000+0000", "created": "2012-10-04T22:08:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "parity", "qe-testadded" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "13496", "description": "Release 2.0.3", "name": "Release 2.0.3", "archived": true, "released": false } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:09.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "the timeout can be set in the below ways:\r\n\r\n{code}\r\nclient.timeout=timeOut; \r\nclient.setTimeout(timeOut); \r\nvar client = Titanium.Network.createHTTPClient({timeout=timeOut});\r\n{code}\r\nBut it only works when its set as client.timeout=timeOut; \r\nh4. Steps to reproduce:\r\nIn the below code If you can replace with any of the above three it should work the same but it does not. \r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'pink'\r\n});\r\nwin.open();\r\n\r\nvar postData = '{\"email\":\"vaibhav.mundale@zeonsolutions.com\",\"password_hash\":\"1234567\",\"deviceUId\":\"14913af4-025c-e301-239b-1ba1-400e491f50a9\",\"password\":\"1234567\",\"store_id\":\"5\"}';\r\n\r\nvar timeOut = 1500;\r\nvar client = Titanium.Network.createHTTPClient({timeout:timeOut});\r\nif(Ti.Platform.osname !== 'android')\r\n client.tlsVersion = Titanium.Network.TLS_VERSION_1_1;\r\nclient.open('POST', 'http://173.227.201.16/BradyMobile/Login');\r\nclient.setRequestHeader(\"Content-Type\", \"text/json\");\r\nclient.onload = function() \r\n{\r\n alert('Status load:' + this.status +':'+ this.responseText);\r\n}\r\nclient.onerror = function(e) \r\n{\r\n alert('Status error:' + this.status +':'+ this.responseText);\r\n};\r\nclient.send(postData);\r\n{code}\r\n1. Run this code\r\nExpected behavior: error alert pops up, timeout exception in log\r\nActual behavior: nothing happens", "attachment": [], "flagged": false, "summary": "Android: client.setTimeout does not work.", "creator": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 2.1.1 GA, Ti SDK 2.1.2 GA, Android 2.2, 2.3.3", "comment": { "comments": [ { "id": "225403", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3342", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-29T20:26:41.000+0000", "updated": "2012-10-29T20:26:41.000+0000" }, { "id": "235311", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nStudio: 3.0.1.201212181159\r\nSDK: 3.1.0.v20130114171802\r\nAndroid Device: LG P970 (v2.2), Samsung Galaxy Note (v2.3.6)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-22T08:38:03.000+0000", "updated": "2013-01-22T08:38:03.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }