[Bug 45899] Add keepalive on different channel
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Feb 13 02:36:52 PST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=45899
prochazka.nicolas at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from prochazka.nicolas at gmail.com 2012-02-13 02:36:52 PST ---
as marc andre says, just set keepalive flag resolved this issue.
Thanks.
Nicolas.
diff --git a/spice-gtk-0.9/gtk/spice-channel.c b/tmp/spice-gtk-0.9/gtk/spice-channel.c
index bdfb02b..49c69c9 100644
--- a/spice-gtk-0.9/gtk/spice-channel.c
+++ b/tmp/spice-gtk-0.9/gtk/spice-channel.c
@@ -2096,6 +2096,7 @@ static void *spice_channel_coroutine(void *data)
}
g_socket_set_blocking(c->sock, FALSE);
+ g_socket_set_keepalive(c->sock, TRUE);
goto connected;
}
diff --git a/spice-gtk-0.9/gtk/spice-session.c b/tmp/spice-gtk-0.9/gtk/spice-session.c
index 33c297a..0156f94 100644
--- a/spice-gtk-0.9/gtk/spice-session.c
+++ b/tmp/spice-gtk-0.9/gtk/spice-session.c
@@ -1417,6 +1417,7 @@ static GSocket *channel_connect_socket(SpiceChannel *channel,
return NULL;
g_socket_set_blocking(sock, FALSE);
+ g_socket_set_keepalive(sock, TRUE);
if (!g_socket_connect(sock, sockaddr, NULL, error)) {
if (*error && (*error)->code == G_IO_ERROR_PENDING) {
g_clear_error(error);
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the spice-bugs
mailing list