static void nbd_teardown_connection(NbdClientSession *client)

{

    struct nbd_request request = {

        .type = NBD_CMD_DISC,

        .from = 0,

        .len = 0

    };



    nbd_send_request(client->sock, &request);



    /* finish any pending coroutines */

    shutdown(client->sock, 2);

    nbd_recv_coroutines_enter_all(client);



    qemu_aio_set_fd_handler(client->sock, NULL, NULL, NULL);

    closesocket(client->sock);

    client->sock = -1;

}

static void nbd_teardown_connection(NbdClientSession *client)

{

    struct nbd_request request = {

        .type = NBD_CMD_DISC,

        .from = 0,

        .len = 0

    };



    nbd_send_request(client->sock, &request);



    

    shutdown(client->sock, 2);

    nbd_recv_coroutines_enter_all(client);



    qemu_aio_set_fd_handler(client->sock, NULL, NULL, NULL);

    closesocket(client->sock);

    client->sock = -1;

}

static void nbd_teardown_connection(NbdClientSession *client)     nbd_send_request(client->sock, &request);     shutdown(client->sock, 2);     nbd_recv_coroutines_enter_all(client);     qemu_aio_set_fd_handler(client->sock, NULL, NULL, NULL);     closesocket(client->sock);     client->sock = -1;
static void FUNC_0(NbdClientSession *VAR_0)

{

    struct nbd_request VAR_1 = {

        .type = NBD_CMD_DISC,

        .from = 0,

        .len = 0

    };



    nbd_send_request(VAR_0->sock, &VAR_1);



    

    shutdown(VAR_0->sock, 2);

    nbd_recv_coroutines_enter_all(VAR_0);



    qemu_aio_set_fd_handler(VAR_0->sock, NULL, NULL, NULL);

    closesocket(VAR_0->sock);

    VAR_0->sock = -1;

}

static void FUNC_0(NbdClientSession *VAR_0)
{ struct nbd_request VAR_1 = { .type = NBD_CMD_DISC,
.from = 0,
.len = 0
}; nbd_send_request(VAR_0->sock, &VAR_1); shutdown(VAR_0->sock, 2); nbd_recv_coroutines_enter_all(VAR_0); qemu_aio_set_fd_handler(VAR_0->sock, NULL, NULL, NULL); closesocket(VAR_0->sock); VAR_0->sock = -1; }