Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix uv_tcp_nodelay return value in case of error
Browse files Browse the repository at this point in the history
Fixes #1102
  • Loading branch information
saghul committed Feb 10, 2014
1 parent 419c2ff commit 3901ec4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unix/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 3901ec4

Please sign in to comment.