From a7f28a098ef43fef93f150018acdada564b6da21 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() - This check is already covered in EventEmitter#addListener() Refs: https://github.com/nodejs/node/pull/3618 PR-URL: https://github.com/nodejs/node/pull/3631 Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Jeremiah Senkpiel --- 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); }