connection: stop refill when 0 bytes read

This commit is contained in:
Wim Taymans 2019-04-02 23:02:58 +02:00
parent 56158fbb62
commit 5c896fedd5

View file

@ -158,7 +158,7 @@ static int refill_buffer(struct pw_protocol_native_connection *conn, struct buff
while (true) {
len = recvmsg(conn->fd, &msg, msg.msg_flags);
if (len < 0) {
if (len <= 0) {
if (errno == EINTR)
continue;
if (errno != EAGAIN || errno != EWOULDBLOCK)