Created
February 9, 2014 10:31
-
-
Save saghul/8897297 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/unix/tcp.c b/src/unix/tcp.c | |
index 2c36dc3..9c50b2d 100644 | |
--- a/src/unix/tcp.c | |
+++ b/src/unix/tcp.c | |
@@ -232,7 +232,9 @@ int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) { | |
int uv__tcp_nodelay(int fd, int on) { | |
- return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); | |
+ if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on))) | |
+ return -errno; | |
+ return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment