Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created December 7, 2011 23:33
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 bnoordhuis/61f188de167473c4187e to your computer and use it in GitHub Desktop.
Save bnoordhuis/61f188de167473c4187e to your computer and use it in GitHub Desktop.
diff --git a/lib/net.js b/lib/net.js
index 19858e8..e182173 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -465,7 +465,11 @@ function afterWrite(status, handle, req, buffer) {
if (self.destroyed) {
return;
}
- // TODO check status.
+
+ if (status) {
+ self.destroy(errnoException(errno, 'write'));
+ return;
+ }
timers.active(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment