summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-02-26 15:30:18 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2014-03-14 16:28:28 +0100
commit4a41a2d68a684241aca96dba066e0699941b730d (patch)
treec3c9a72476b39a3ee58029436fd24bc318d44093 /tests
parent62e466e84592900756f080802782d0615c6a3b5c (diff)
downloadqemu-4a41a2d68a684241aca96dba066e0699941b730d.tar.gz
nbd: close socket if connection breaks
nbd_receive_reply() is called by the event loop whenever data is available or the socket has been closed by the remote side. This patch closes the socket when an error occurs to prevent the nbd_receive_reply() handler from being called indefinitely after the connection has failed. Note that we were already correctly returning EIO for pending requests but leaving the nbd_receive_reply() handler registered resulted in high CPU consumption and a flood of error messages. Reuse nbd_teardown_connection() to close the socket. Reported-by: Zhifeng Cai <bluewindow@h3c.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions