projects
/
free-sw
/
xcb
/
libxcb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e82c34c
)
setsockopt(SO_KEEPALIVE) on TCP display connections.
author
Adam Jackson
<ajax@redhat.com>
Wed, 2 Dec 2009 19:31:56 +0000
(14:31 -0500)
committer
Adam Jackson
<ajax@redhat.com>
Wed, 2 Dec 2009 19:31:56 +0000
(14:31 -0500)
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@redhat.com>
src/xcb_util.c
patch
|
blob
|
history
diff --git
a/src/xcb_util.c
b/src/xcb_util.c
index
55aadb7
..
c3cbfa6
100644
(file)
--- 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;