diff --git a/chardev/char-socket.c b/chardev/char-socket.c index a220803c012383c52b7c3f1ed3bad9b7b7ae9d92..541fcf487df5c745966ee9816396129188638c8f 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -450,7 +450,7 @@ static gboolean tcp_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) len = s->max_size; } size = tcp_chr_recv(chr, (void *)buf, len); - if (size == 0 || size == -1) { + if (size == 0 || (size == -1 && errno != EAGAIN)) { /* connection closed */ tcp_chr_disconnect(chr); } else if (size > 0) {