{ "id": "61431", "key": "TIMOB-799", "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": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:16.000+0000", "created": "2011-04-15T02:36:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:16.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

from premium ticket:
\nhttp://helpdesk.appcelerator.net/tickets/2011

\n

if you have a data object in the xhr.send, the timeout seems to\nbe 72 seconds vs. the 30 seconds that is specified via\nsetTimeout

\n
\n\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\nTitanium.UI.setBackgroundColor('#000');\n\n// create tab group\nvar tabGroup = Titanium.UI.createTabGroup();\n\n\n//\n// create base UI tab and root window\n//\nvar win1 = Titanium.UI.createWindow({  \n    title:'Tab 1',\n    backgroundColor:'#fff'\n});\nvar tab1 = Titanium.UI.createTab({  \n    icon:'KS_nav_views.png',\n    title:'Tab 1',\n    window:win1\n});\n\nvar label1 = Titanium.UI.createLabel({\n    color:'#999',\n    text:'Waiting for response...',\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\n    textAlign:'center',\n    width:'auto'\n});\n\nwin1.add(label1);\n\n//\n// create controls tab and root window\n//\nvar win2 = Titanium.UI.createWindow({  \n    title:'Tab 2',\n    backgroundColor:'#fff'\n});\nvar tab2 = Titanium.UI.createTab({  \n    icon:'KS_nav_ui.png',\n    title:'Tab 2',\n    window:win2\n});\n\nvar label2 = Titanium.UI.createLabel({\n    color:'#999',\n    text:'I am Window 2',\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\n    textAlign:'center',\n    width:'auto'\n});\n\nwin2.add(label2);\n\n\n\n//\n//  add tabs\n//\ntabGroup.addTab(tab1);  \ntabGroup.addTab(tab2);  \n\n\n// open tab group\ntabGroup.open();\n\nvar start;\n\nvar xhr = Ti.Network.createHTTPClient();\nxhr.setTimeout(30000);\n\nxhr.onload = function()\n{\n    label1.text = 'Received the response.';\n};\n\nxhr.onerror = function()\n{\n    var now = new Date();\n    var time = (((now - start) / 1000) | 0);\n    label1.text = 'Registered error: time passed = ' + (now-start) + ' seconds';\n};\n\n// use any ip address that is not on the network\nvar notExistIP = 'http://192.168.1.23';\n\n// use any unreachable IP address\nxhr.open('GET',notExistIP);\nstart = new Date();\nvar data = {\n    value1: 'value1',\n    value2: 'value2'\n};\n\n// it works if no data is sent\n//xhr.send();\n\n// it doesn't work if data is sent\nxhr.send(data);\n
{html}", "attachment": [], "flagged": false, "summary": "setTimeout on XHR varies based on send w/data or without", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124060", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [5f59e16c4abbe584f5a470a3590304135b10789a])\nCloses #799 \nhttp://github.com/appcelerator/titanium_mobile/commit/5f59e16c4abbe...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:36:41.000+0000", "updated": "2011-04-15T02:36:41.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }