As of node-cubrid 1.1.1 when trying to connect to a server which is down (intentionally), a connect event is never fired, meaning it never fails when trying to connect to a database which is down.
There must be a configurable parameter with a default timeout value which should fire an error event with a message of connection being timed out.
{code}
var CUBRID = require('node-cubrid');
var conn = CUBRID.createCUBRIDConnection('10.11.12.13', 33000, 'dba', '', 'cubrid_cloud');
conn.connect(function (err) {
if (err) {
console.log(err);
}
else{
console.log('connection established');
conn.close(function () {
console.log('connection closed');
});
}
});
{code}