From aec5b8a44fa2fbece87441656eaf7ffb9a53fc6e Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 14 Jan 2010 10:25:14 -0600 Subject: [PATCH] Fix: Make remote disconnect detection work --- gatchat/gatchat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c index ea17335e..8af927ed 100644 --- a/gatchat/gatchat.c +++ b/gatchat/gatchat.c @@ -801,7 +801,7 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond, if (cond & (G_IO_HUP | G_IO_ERR)) return FALSE; - if (err != G_IO_ERROR_NONE && err != G_IO_ERROR_AGAIN) + if (rbytes == 0 && err != G_IO_ERROR_AGAIN) return FALSE; return TRUE;