Github user guptanishank commented on a diff in the pull request: https://github.com/apache/thrift/pull/1141#discussion_r93392404 --- Diff: lib/nodejs/lib/thrift/http_connection.js --- @@ -214,6 +214,18 @@ HttpConnection.prototype.write = function(data) { var req = (self.https) ? https.request(self.nodeOptions, self.responseCallback) : http.request(self.nodeOptions, self.responseCallback); + + //support for timeout + var timeout = self.nodeOptions.timeout; + if(timeout){ + req.on('socket', function (socket) { + socket.setTimeout(timeout); + socket.on('timeout', function() { + req.abort(); + }); + }); + } --- End diff -- Not sure on how to check whether the option is supported. I found out that node 4.x.x doesn't have it whereas node 6.x.x had it. yes can reduce one indent level by using req.setTimeout
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---