diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2013-07-15 16:23:03 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2013-07-15 16:23:03 (GMT) |
commit | a1120b662b4653e34ed663e21d7bb06cbba49499 (patch) | |
tree | bca0a71c91e8fb604fc03c96af8d98beb96a597b /tcp.c | |
parent | f9635fea9f805d6f9930e47a4a1c8c5592849f3a (diff) | |
parent | 2676fae2cf3a00368f311d52f3941b62005aee72 (diff) | |
download | powwow-a1120b662b4653e34ed663e21d7bb06cbba49499.zip powwow-a1120b662b4653e34ed663e21d7bb06cbba49499.tar.gz powwow-a1120b662b4653e34ed663e21d7bb06cbba49499.tar.bz2 |
pull from kalev
Diffstat (limited to 'tcp.c')
-rw-r--r-- | tcp.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -226,6 +226,10 @@ int tcp_connect __P2 (char *,addr, int,port) if (setsockopt(newtcp_fd, SOL_TCP, TCP_NODELAY, &opt, sizeof(opt))) errmsg("setsockopt(TCP_NODELAY) failed"); + /* TCP keep-alive */ + if (setsockopt(newtcp_fd, SOL_SOCKET, SO_KEEPALIVE, &opt, sizeof(opt))) + errmsg("setsockopt(SO_KEEPALIVE) failed"); + /* * Then, close-on-exec: * we don't want children to inherit the socket! |