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 rvagg committed Nov 6, 2015
1 parent a0db5fb commit a7f28a0
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 a7f28a0

Please sign in to comment.