Skip to content

Commit

Permalink
http: remove unneeded cb check from setTimeout()
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
aks- authored and Fishrock123 committed Nov 5, 2015
1 parent dac1d38 commit 8625a38
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/_http_outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8625a38

Please sign in to comment.