summaryrefslogtreecommitdiff
path: root/lib/net.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net.js')
-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) {