]> git.proxmox.com Git - mirror_qemu.git/commit - nbd/client-connection.c
nbd/client-connection: shutdown connection on release
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 10 Jun 2021 10:07:51 +0000 (13:07 +0300)
committerEric Blake <eblake@redhat.com>
Fri, 18 Jun 2021 15:59:53 +0000 (10:59 -0500)
commitf58b2dfe3e815d0c8491b33c36622824e8a08e40
treec467b6ca4ea66fbaffe056092b79daac8ed621bf
parente0e67cbe58f42500e3451c46b3caba572f2a965f
nbd/client-connection: shutdown connection on release

Now, when a thread can do negotiation and retry, it may run relatively
long. We need a mechanism to stop it, when the user is not interested
in a result any more. So, on nbd_client_connection_release() let's
shutdown the socket, and do not retry connection if thread is detached.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210610100802.5888-22-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
nbd/client-connection.c