Skip to content

Instantly share code, notes, and snippets.

@ry
Created September 27, 2011 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ry/1244448 to your computer and use it in GitHub Desktop.
Save ry/1244448 to your computer and use it in GitHub Desktop.
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;
@ry
Copy link
Author

ry commented Sep 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment