Il 29/11/2013 15:58, Marc-André Lureau ha scritto:
> closesocket(client->sock);
> +/* finish any pending coroutines */
> +client->reply.handle = 0;
> +client->reply.error = EIO;
> +nbd_recv_coroutines_enter_all(client);
What about using the same shutdown(2) trick as the server
Make sure all pending coroutines are finished when closing the session.
Signed-off-by: Marc-André Lureau
---
block/nbd-client.c | 22 +-
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/block/nbd-client.c b/block/nbd-client.c
index c0ad2c2..ad6fb01 100644
--- a/