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 /test/parallel/test-tls-timeout-server-2.js | |
parent | c7fb91dc1310f9454d4aa8091bcc6d305322a72f (diff) | |
download | node-new-d4726cde57856896c560820b89eae0bc08621034.tar.gz |
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 'test/parallel/test-tls-timeout-server-2.js')
-rw-r--r-- | test/parallel/test-tls-timeout-server-2.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-tls-timeout-server-2.js b/test/parallel/test-tls-timeout-server-2.js index a16ce33167..dc3d52da01 100644 --- a/test/parallel/test-tls-timeout-server-2.js +++ b/test/parallel/test-tls-timeout-server-2.js @@ -15,10 +15,11 @@ var options = { }; var server = tls.createServer(options, function(cleartext) { - cleartext.setTimeout(50, function() { + var s = cleartext.setTimeout(50, function() { cleartext.destroy(); server.close(); }); + assert.ok(s instanceof tls.TLSSocket); }); server.listen(common.PORT, function() { |