From fa2eaeafdaee2a8b5171e4c8fd4bf7c0b19ef2ac Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 26 Sep 2011 23:25:48 -0700 Subject: [PATCH] write-only streams should not shutdown See https://github.com/joyent/node/issues/1726#issuecomment-2207602 --- lib/net_uv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net_uv.js b/lib/net_uv.js index 0fcdce9..207a1f4 100644 --- a/lib/net_uv.js +++ b/lib/net_uv.js @@ -195,7 +195,7 @@ Socket.prototype.end = function(data, encoding) { if (data) this.write(data, encoding); DTRACE_NET_STREAM_END(this); - if (this._flags & FLAG_GOT_EOF) { + if (!this.readable) { this.destroySoon(); } else { this._flags |= FLAG_SHUTDOWN; -- 2.7.4