Skip to content

Commit a7f28a0

Browse files
aks-rvagg
authored andcommitted
http: remove unneeded cb check from setTimeout()
- This check is already covered in EventEmitter#addListener() Refs: #3618 PR-URL: #3631 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent a0db5fb commit a7f28a0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/_http_outgoing.js

-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ exports.OutgoingMessage = OutgoingMessage;
9191
OutgoingMessage.prototype.setTimeout = function(msecs, callback) {
9292

9393
if (callback) {
94-
if (typeof callback !== 'function')
95-
throw new TypeError('callback must be a function');
9694
this.on('timeout', callback);
9795
}
9896

0 commit comments

Comments
 (0)