[Xcb-commit] src
Adam Jackson
ajax at kemper.freedesktop.org
Wed Dec 2 11:36:26 PST 2009
src/xcb_util.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 1cf2a87def76f4646fe05e282b45605d572f2513
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Dec 2 14:31:56 2009 -0500
setsockopt(SO_KEEPALIVE) on TCP display connections.
This matches xtrans behaviour in SocketINETConnect, and makes it so apps
don't hang forever if their display dies.
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/src/xcb_util.c b/src/xcb_util.c
index 55aadb7..c3cbfa6 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -260,6 +260,7 @@ static int _xcb_open_tcp(char *host, char *protocol, const unsigned short port)
if(fd >= 0) {
int on = 1;
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
+ setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
if (connect(fd, addr->ai_addr, addr->ai_addrlen) >= 0)
break;
More information about the xcb-commit
mailing list