THRIFT-4844: createConnection ignores connect_timeout option
diff --git a/lib/nodejs/lib/thrift/connection.js b/lib/nodejs/lib/thrift/connection.js
index 72ecb69..25e34ed 100644
--- a/lib/nodejs/lib/thrift/connection.js
+++ b/lib/nodejs/lib/thrift/connection.js
@@ -256,7 +256,11 @@
 };
 
 exports.createConnection = function(host, port, options) {
-  var stream = net.createConnection(port, host);
+  var stream = net.createConnection( {
+    port: port, 
+    host: host,
+    timeout: options.connect_timeout || options.timeout || 0
+  });
   var connection = new Connection(stream, options);
   connection.host = host;
   connection.port = port;