[Spice-devel] spice channel and conntrack netfilter

nicolas prochazka prochazka.nicolas at gmail.com
Mon Feb 13 05:38:55 PST 2012


Hi,
as you says, set keepalive is ok and correct this issue,  ( my friday
test is badly, sorry  )
can it commit to git ?

Regards,
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);

2012/2/12 Marc-André Lureau <marcandre.lureau at gmail.com>:
> Hi
>
> On Sun, Feb 12, 2012 at 4:08 PM, Alon Levy <alevy at redhat.com> wrote:
>> So at least the change won't require a protocol update.
>
> I thought setting keep-alive on a tcp socket would be enough. But
> according to https://bugs.freedesktop.org/show_bug.cgi?id=45899#c2 it
> didn't help. Should the "ping" message be sent by the client, the
> server, both? every 5 minutes of idle?
>
> --
> Marc-André Lureau


More information about the Spice-devel mailing list