diff options
author | Roman Reiss <me@silverwind.io> | 2015-05-23 07:48:13 +0200 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2015-05-23 18:10:32 +0200 |
commit | cb381fe3e08e8a249738f791a984f452ff70c68d (patch) | |
tree | 12d8f03ffba5a2680a025478381faa51a3fe2e01 /test/parallel/test-net-persistent-nodelay.js | |
parent | 39dde3222e4733fc1b59c45e392d9ff1a88ae4cc (diff) | |
download | node-new-cb381fe3e08e8a249738f791a984f452ff70c68d.tar.gz |
net: return this from setNoDelay and setKeepAlive
Modifies the Socket.setNoDelay and Socket.setKeepAlive methods to return
the socket instance instead of undefined, to allow for chaining.
PR-URL: https://github.com/nodejs/io.js/pull/1779
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-net-persistent-nodelay.js')
-rw-r--r-- | test/parallel/test-net-persistent-nodelay.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-net-persistent-nodelay.js b/test/parallel/test-net-persistent-nodelay.js index 8ed5925f11..e120305b3a 100644 --- a/test/parallel/test-net-persistent-nodelay.js +++ b/test/parallel/test-net-persistent-nodelay.js @@ -24,7 +24,8 @@ echoServer.on('listening', function() { // setNoDelay before the handle is created // there is probably a better way to test this - sock1.setNoDelay(); + var s = sock1.setNoDelay(); + assert.ok(s instanceof net.Socket); sock1.connect(common.PORT); sock1.on('end', function() { assert.equal(callCount, 1); |