summaryrefslogtreecommitdiff
path: root/gatchat
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-01-14 10:25:14 -0600
committerMarcel Holtmann <marcel@holtmann.org>2010-01-14 12:51:41 -0800
commit5d48d4c3b5ed078d42b82b2be066265cc39ef401 (patch)
treedd254a65fc5116fd410ed918021afa130dc522be /gatchat
parent68aed0a400dd6b4fe1d75d8f911a6e79ee8396b8 (diff)
downloadconnman-5d48d4c3b5ed078d42b82b2be066265cc39ef401.tar.gz
connman-5d48d4c3b5ed078d42b82b2be066265cc39ef401.tar.bz2
connman-5d48d4c3b5ed078d42b82b2be066265cc39ef401.zip
Fix: Make remote disconnect detection work
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/gatchat.c2
1 files changed, 1 insertions, 1 deletions
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;