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:
parent
dac1d38a02
commit
8625a3815e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user