From 395e324d407f49f0c160c3d59edc2ce5adbe724a Mon Sep 17 00:00:00 2001 From: Ashok Suthar Date: Thu, 5 Nov 2015 20:03:18 +0530 Subject: [PATCH] http: remove unneeded cb check from setTimeout - check is already covered by event emitter --- lib/_http_outgoing.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index e28609f8869a11..e3a258b1cddd12 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -91,8 +91,6 @@ exports.OutgoingMessage = OutgoingMessage; OutgoingMessage.prototype.setTimeout = function(msecs, callback) { if (callback) { - if (typeof callback !== 'function') - throw new TypeError('callback must be a function'); this.on('timeout', callback); }