summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-persistent-keepalive.js
diff options
context:
space:
mode:
authorRoman Reiss <me@silverwind.io>2015-05-23 07:48:13 +0200
committerRoman Reiss <me@silverwind.io>2015-05-23 18:10:32 +0200
commitcb381fe3e08e8a249738f791a984f452ff70c68d (patch)
tree12d8f03ffba5a2680a025478381faa51a3fe2e01 /test/parallel/test-net-persistent-keepalive.js
parent39dde3222e4733fc1b59c45e392d9ff1a88ae4cc (diff)
downloadandroid-node-v8-cb381fe3e08e8a249738f791a984f452ff70c68d.tar.gz
android-node-v8-cb381fe3e08e8a249738f791a984f452ff70c68d.tar.bz2
android-node-v8-cb381fe3e08e8a249738f791a984f452ff70c68d.zip
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-keepalive.js')
-rw-r--r--test/parallel/test-net-persistent-keepalive.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-net-persistent-keepalive.js b/test/parallel/test-net-persistent-keepalive.js
index adf7d7a4fa..a54833a8f5 100644
--- a/test/parallel/test-net-persistent-keepalive.js
+++ b/test/parallel/test-net-persistent-keepalive.js
@@ -18,7 +18,8 @@ echoServer.on('listening', function() {
var clientConnection = new net.Socket();
// send a keepalive packet after 1000 ms
// and make sure it persists
- clientConnection.setKeepAlive(true, 400);
+ var s = clientConnection.setKeepAlive(true, 400);
+ assert.ok(s instanceof net.Socket);
clientConnection.connect(common.PORT);
clientConnection.setTimeout(0);