summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2015-03-22 12:38:42 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2015-03-24 14:09:16 -0700
commitf201331754d2620cf1770acc8b327d7d9a157333 (patch)
tree9b401c6d114ced748116cff36ac9637f6bcded5a
parentfa79367e9873930fc69c52f8f52a67e6c4428d06 (diff)
downloadnode-f201331754d2620cf1770acc8b327d7d9a157333.tar.gz
net: add destroy event
-rw-r--r--lib/net.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net.js b/lib/net.js
index d16bba141..3067dc108 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -524,6 +524,7 @@ Socket.prototype._destroy = function(exception, cb) {
// to make it re-entrance safe in case Socket.prototype.destroy()
// is called within callbacks
this.destroyed = true;
+ this.emit('destroy', exception);
fireErrorCallbacks();
if (this.server) {