diff --git a/lib/net.js b/lib/net.js index a25673c3a04..03b09c3c5af 100644 --- a/lib/net.js +++ b/lib/net.js @@ -215,6 +215,10 @@ Stream.prototype.open = function (fd, type) { setImplmentationMethods(this); + if (this.type === "unix") { + this._writeWatcher.isUnixSocket = true; + } + this._writeWatcher.set(this.fd, false, true); this.writable = true; }; @@ -520,6 +524,7 @@ Stream.prototype.destroy = function (exception) { this._writeWatcher.socket = null; this._writeWatcher.firstBucket = null; this._writeWatcher.lastBucket = null; + this._writeWatcher.isUnixSocket = false; ioWatchers.free(this._writeWatcher); this._writeWatcher = null; } diff --git a/src/node_io_watcher.cc b/src/node_io_watcher.cc index 943deb7056b..3f850762796 100644 --- a/src/node_io_watcher.cc +++ b/src/node_io_watcher.cc @@ -557,6 +557,4 @@ void IOWatcher::Dump() { } - - } // namespace node