From 4b2c756bfc4dea51236161d7e0c519a0c6918221 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 5 Jun 2017 12:35:43 -0700 Subject: [PATCH] lib: return this from net.Socket.end() PR-URL: https://github.com/nodejs/node/pull/13481 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Refael Ackermann Reviewed-By: Evan Lucas Reviewed-By: Brian White --- doc/api/net.md | 2 ++ lib/net.js | 2 ++ test/parallel/test-socket-write-after-fin.js | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index fc0ea4cc12dd02..d35ec06c2431be 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -648,6 +648,8 @@ server will still send some data. If `data` is specified, it is equivalent to calling `socket.write(data, encoding)` followed by [`socket.end()`][]. +Returns `socket`. + ### socket.localAddress