diff options
author | Evan Lucas <evanlucas@me.com> | 2015-05-13 21:25:57 -0500 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2015-05-16 07:17:41 +0200 |
commit | d4726cde57856896c560820b89eae0bc08621034 (patch) | |
tree | 01e5ec875240d6e0fb9a7b4e8cfba309dd271a44 /lib/_http_incoming.js | |
parent | c7fb91dc1310f9454d4aa8091bcc6d305322a72f (diff) | |
download | android-node-v8-d4726cde57856896c560820b89eae0bc08621034.tar.gz android-node-v8-d4726cde57856896c560820b89eae0bc08621034.tar.bz2 android-node-v8-d4726cde57856896c560820b89eae0bc08621034.zip |
http,net,tls: return this from setTimeout methods
Modifies the setTimeout methods for the following prototypes:
- http.ClientRequest
- http.IncomingMessage
- http.OutgoingMessage
- http.Server
- https.Server
- net.Socket
- tls.TLSSocket
Previously, the above functions returned undefined. They now return
`this`. This is useful for chaining function calls.
PR-URL: https://github.com/nodejs/io.js/pull/1699
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'lib/_http_incoming.js')
-rw-r--r-- | lib/_http_incoming.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index aea665e809..b371c7d7a5 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -68,6 +68,7 @@ IncomingMessage.prototype.setTimeout = function(msecs, callback) { if (callback) this.on('timeout', callback); this.socket.setTimeout(msecs); + return this; }; |