diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-07-27 01:14:57 +0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-07-29 00:33:46 +0300 |
commit | 9c7d18b3a59f6e4464543905dede90f1a65096cc (patch) | |
tree | 9ecb2b804fe9f6db009115d924fdc9b40fa7ed36 /net/net.c | |
parent | d9d261142d554504a32d95b771e9d8191631323f (diff) |
vhost-user: disconnect on HUP
In some cases, qemu_chr_fe_read_all() on HUP event doesn't raise
CHR_EVENT_CLOSED because the read/recv function returns -1 on
disconnected peers (for example with tch_chr_recv, an ECONNRESET errno
overwritten as EIO).
It is simpler to explicitely disconnect on HUP, rising CHR_EVENT_CLOSED
if it wasn't disconnected already.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net/net.c')
0 files changed, 0 insertions, 0 deletions