summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gatchat/gatmux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gatchat/gatmux.c b/gatchat/gatmux.c
index b70f6a0d..139edd2e 100644
--- a/gatchat/gatmux.c
+++ b/gatchat/gatmux.c
@@ -433,6 +433,9 @@ static GIOStatus channel_read(GIOChannel *channel, gchar *buf, gsize count,
*bytes_read = ring_buffer_read(mux_channel->buffer, buf, avail);
+ if (*bytes_read == 0)
+ return G_IO_STATUS_AGAIN;
+
return G_IO_STATUS_NORMAL;
}