From 9ffc6ec0dd8c1d7bd51b8fec180c8881175a98b6 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 3 Mar 2009 14:47:29 +0000 Subject: gibber-fd-transport: don't close transport when we get HUP as the buffers can be not empty --- lib/gibber/gibber-fd-transport.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/gibber/gibber-fd-transport.c b/lib/gibber/gibber-fd-transport.c index c7eedee01..41166e65a 100644 --- a/lib/gibber/gibber-fd-transport.c +++ b/lib/gibber/gibber-fd-transport.c @@ -335,12 +335,6 @@ _channel_io_err (GIOChannel *source, GIOCondition condition, gpointer data) code = GIBBER_FD_TRANSPORT_ERROR_FAILED; msg = "Error on GIOChannel"; } - else if (condition & G_IO_HUP) - { - DEBUG ("Connection has been broken. Closing the transport"); - code = GIBBER_FD_TRANSPORT_ERROR_PIPE; - msg = "Connection has been broken"; - } else { g_assert_not_reached (); @@ -430,7 +424,7 @@ gibber_fd_transport_set_fd (GibberFdTransport *self, int fd) priv->watch_in = g_io_add_watch (priv->channel, G_IO_IN, _channel_io_in, self); priv->watch_err = - g_io_add_watch (priv->channel, G_IO_ERR|G_IO_HUP, _channel_io_err, self); + g_io_add_watch (priv->channel, G_IO_ERR, _channel_io_err, self); gibber_transport_set_state (GIBBER_TRANSPORT(self), GIBBER_TRANSPORT_CONNECTED); -- cgit v1.2.3