Skip to content

Instantly share code, notes, and snippets.

@saghul
Created April 30, 2015 19:40
Show Gist options
  • Save saghul/52677dba652ab8e78051 to your computer and use it in GitHub Desktop.
Save saghul/52677dba652ab8e78051 to your computer and use it in GitHub Desktop.
diff --git a/src/win/tcp.c b/src/win/tcp.c
index c5ddbed..e00dd03 100644
--- a/src/win/tcp.c
+++ b/src/win/tcp.c
@@ -869,7 +869,12 @@ int uv_tcp_write(uv_loop_t* loop,
}
} else {
/* Send failed due to an error. */
- return WSAGetLastError();
+ req->queued_bytes = 0;
+ handle->reqs_pending++;
+ handle->write_reqs_pending++;
+ REGISTER_HANDLE_REQ(loop, handle, req);
+ SET_REQ_ERROR(req, WSAGetLastError());
+ uv_insert_pending_req(loop, (uv_req_t*) req);
}
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment