diff options
author | Brendan Ashworth <squirrelslikeacorns@gmail.com> | 2014-12-29 12:12:30 -0800 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-29 17:25:45 +0100 |
commit | 4444b7b52ced6209513acdc664e5d7586bbedc8a (patch) | |
tree | bebd48a52e19545594411600ac0beec21d7f7c5a /lib/dgram.js | |
parent | 3e0057dd61626890e1880ed1e609ef31ce39720b (diff) | |
download | nodejs-4444b7b52ced6209513acdc664e5d7586bbedc8a.tar.gz nodejs-4444b7b52ced6209513acdc664e5d7586bbedc8a.tar.bz2 nodejs-4444b7b52ced6209513acdc664e5d7586bbedc8a.zip |
dgram: changes Socket.close() to return itself
This commit adds a return statement to the dgram.Socket.close()
function that returns itself after it finishes. This follows along
the functionality of the more popular and, dare I say, father-library
`lib/net.js`.
PR-URL: https://github.com/iojs/io.js/pull/214
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/dgram.js')
-rw-r--r-- | lib/dgram.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dgram.js b/lib/dgram.js index 6b1772e61..ac7a054a4 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -358,6 +358,8 @@ Socket.prototype.close = function() { this._handle.close(); this._handle = null; this.emit('close'); + + return this; }; |