diff options
Diffstat (limited to 'sshnodelay.c')
-rw-r--r-- | sshnodelay.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sshnodelay.c b/sshnodelay.c index 03a4756..7518089 100644 --- a/sshnodelay.c +++ b/sshnodelay.c @@ -7,12 +7,12 @@ int connect(int sock, const struct sockaddr *addr, socklen_t addrlen) { - int (*next_connect)(int, const struct sockaddr *, socklen_t) = - dlsym(RTLD_NEXT, "connect"); - int res = next_connect(sock, addr, addrlen); - if (!res && addr->sa_family == AF_INET) { - int opt = 1; - setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)); - } - return res; + int (*next_connect)(int, const struct sockaddr *, socklen_t) = + dlsym(RTLD_NEXT, "connect"); + int res = next_connect(sock, addr, addrlen); + if (!res && addr->sa_family == AF_INET) { + int opt = 1; + setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)); + } + return res; } |