# HG changeset patch # User nadvornik # Date 1234818087 0 # Node ID d53d4a448faea329725e5b8ac35512f5ab5efd8c # Parent c37f36b971733c5eec0fa62b31b51e487d8bc429 hopefully fixed a freeze on solaris diff -r c37f36b97173 -r d53d4a448fae src/remote.c --- a/src/remote.c Sun Feb 15 19:25:55 2009 +0000 +++ b/src/remote.c Mon Feb 16 21:01:27 2009 +0000 @@ -60,6 +60,7 @@ { RemoteClient *client = data; RemoteConnection *rc; + GIOStatus status = G_IO_STATUS_NORMAL; rc = client->rc; @@ -71,7 +72,7 @@ GError *error = NULL; guint termpos; - while (g_io_channel_read_line(source, &buffer, NULL, &termpos, &error) == G_IO_STATUS_NORMAL) + while ((status = g_io_channel_read_line(source, &buffer, NULL, &termpos, &error)) == G_IO_STATUS_NORMAL) { if (buffer) { @@ -109,7 +110,7 @@ g_list_free(queue); } - if (condition & G_IO_HUP) + if (condition & G_IO_HUP || status == G_IO_STATUS_EOF || status == G_IO_STATUS_ERROR) { rc->clients = g_list_remove(rc->clients, client);