{"action":"closed","issue":{"url":"https://api.github.com/repos/CUBRID/node-cubrid/issues/29","labels_url":"https://api.github.com/repos/CUBRID/node-cubrid/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/CUBRID/node-cubrid/issues/29/comments","events_url":"https://api.github.com/repos/CUBRID/node-cubrid/issues/29/events","html_url":"https://github.com/CUBRID/node-cubrid/issues/29","id":56155828,"number":29,"title":"Even if timeout occurs, the socket doesn't seem to get closed","user":{"login":"kadishmal","id":978004,"avatar_url":"https://avatars.githubusercontent.com/u/978004?v=3","gravatar_id":"","url":"https://api.github.com/users/kadishmal","html_url":"https://github.com/kadishmal","followers_url":"https://api.github.com/users/kadishmal/followers","following_url":"https://api.github.com/users/kadishmal/following{/other_user}","gists_url":"https://api.github.com/users/kadishmal/gists{/gist_id}","starred_url":"https://api.github.com/users/kadishmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadishmal/subscriptions","organizations_url":"https://api.github.com/users/kadishmal/orgs","repos_url":"https://api.github.com/users/kadishmal/repos","events_url":"https://api.github.com/users/kadishmal/events{/privacy}","received_events_url":"https://api.github.com/users/kadishmal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CUBRID/node-cubrid/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"kadishmal","id":978004,"avatar_url":"https://avatars.githubusercontent.com/u/978004?v=3","gravatar_id":"","url":"https://api.github.com/users/kadishmal","html_url":"https://github.com/kadishmal","followers_url":"https://api.github.com/users/kadishmal/followers","following_url":"https://api.github.com/users/kadishmal/following{/other_user}","gists_url":"https://api.github.com/users/kadishmal/gists{/gist_id}","starred_url":"https://api.github.com/users/kadishmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadishmal/subscriptions","organizations_url":"https://api.github.com/users/kadishmal/orgs","repos_url":"https://api.github.com/users/kadishmal/repos","events_url":"https://api.github.com/users/kadishmal/events{/privacy}","received_events_url":"https://api.github.com/users/kadishmal/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CUBRID/node-cubrid/milestones/15","labels_url":"https://api.github.com/repos/CUBRID/node-cubrid/milestones/15/labels","id":958041,"number":15,"title":"v2.1.0","description":"","creator":{"login":"kadishmal","id":978004,"avatar_url":"https://avatars.githubusercontent.com/u/978004?v=3","gravatar_id":"","url":"https://api.github.com/users/kadishmal","html_url":"https://github.com/kadishmal","followers_url":"https://api.github.com/users/kadishmal/followers","following_url":"https://api.github.com/users/kadishmal/following{/other_user}","gists_url":"https://api.github.com/users/kadishmal/gists{/gist_id}","starred_url":"https://api.github.com/users/kadishmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadishmal/subscriptions","organizations_url":"https://api.github.com/users/kadishmal/orgs","repos_url":"https://api.github.com/users/kadishmal/repos","events_url":"https://api.github.com/users/kadishmal/events{/privacy}","received_events_url":"https://api.github.com/users/kadishmal/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":9,"state":"closed","created_at":"2015-01-30T09:15:18Z","updated_at":"2015-02-01T07:43:55Z","due_on":"2013-08-29T15:00:00Z","closed_at":"2015-01-30T09:26:39Z"},"comments":1,"created_at":"2015-02-01T07:43:41Z","updated_at":"2015-02-01T07:43:55Z","closed_at":"2015-02-01T07:43:55Z","body":"Migrated from http://jira.cubrid.org/browse/APIS-603.\r\n\r\nWhen the following code is executed with no specific timeout set, the timeout occurs after about 75 seconds, then the script exits immediately. That is the script exits as soon as the timeout occurs.\r\n\r\n\tvar CUBRID = require('../'),\r\n\t\t\tclient = new CUBRID.createCUBRIDConnection('www.google.com', 33000, 'public', '', 'demodb');\r\n\r\n\tclient.connect(function (err) {\r\n\t  if (err) {\r\n\t    console.log(err);\r\n\t  } else {\r\n\t    throw 'We should not get here!';\r\n\t  }\r\n\t});\r\n\r\nHowever, in the following code when we specifically set the timeout value to 5 seconds, the timeout correctly occurs after 5 seconds, but the script doesn't quit the next 70 seconds (total 75 seconds as before).\r\n\r\nThis is not correct. The socket should be closed and resources freed as soon as the timeout occurs as in the first example.\r\n\r\n\tvar CUBRID = require('../'),\r\n\t\t\tclient = new CUBRID.createCUBRIDConnection('www.google.com', 33000, 'public', '', 'demodb');\r\n\r\n\tclient.setConnectionTimeout(5000);\r\n\r\n\tclient.connect(function (err) {\r\n\t  if (err) {\r\n\t    console.log(err);\r\n\t  } else {\r\n\t    throw 'We should not get here!';\r\n\t  }\r\n\t});"}}