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 <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
Ashok Suthar 2015-11-05 20:03:18 +05:30 committed by Jeremiah Senkpiel
parent dac1d38a02
commit 8625a3815e

View File

@ -91,8 +91,6 @@ exports.OutgoingMessage = OutgoingMessage;
OutgoingMessage.prototype.setTimeout = function(msecs, callback) { OutgoingMessage.prototype.setTimeout = function(msecs, callback) {
if (callback) { if (callback) {
if (typeof callback !== 'function')
throw new TypeError('callback must be a function');
this.on('timeout', callback); this.on('timeout', callback);
} }