write-only streams should not shutdown

See
https://github.com/joyent/node/issues/1726#issuecomment-2207602
This commit is contained in:
Ryan Dahl 2011-09-26 23:25:48 -07:00
parent 040cf02724
commit fa2eaeafda

View File

@ -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;