On 01/02/2017 05:53, Daniel P. Berrange wrote: >> >> + if (ret < 0 && errno == EPIPE) { > IMHO you should just remove "&& errno == EPIPE" and it'd be fine.
It should be errno != EAGAIN. Paolo >> + if (tcp_chr_read_poll(chr) <= 0) { >> + tcp_chr_disconnect(chr); >> + return len; >> + } /* else let the read handler finish it properly */ >> + }