You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Even if timeout occurs, the socket doesn't seem to get closed #29
When 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.
var CUBRID = require('../'),
client = new CUBRID.createCUBRIDConnection('www.google.com', 33000, 'public', '', 'demodb');
client.connect(function (err) {
if (err) {
console.log(err);
} else {
throw 'We should not get here!';
}
});
However, 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).
This is not correct. The socket should be closed and resources freed as soon as the timeout occurs as in the first example.
var CUBRID = require('../'),
client = new CUBRID.createCUBRIDConnection('www.google.com', 33000, 'public', '', 'demodb');
client.setConnectionTimeout(5000);
client.connect(function (err) {
if (err) {
console.log(err);
} else {
throw 'We should not get here!';
}
});
Activity
kadishmal commentedon Feb 1, 2015
Fixed in v2.1.0 release.