void nbd_client_session_close(NbdClientSession *client)

{

    struct nbd_request request = {

        .type = NBD_CMD_DISC,

        .from = 0,

        .len = 0

    };



    if (!client->bs) {

        return;

    }

    if (client->sock == -1) {

        return;

    }



    nbd_send_request(client->sock, &request);



    nbd_teardown_connection(client);

    client->bs = NULL;

}

void nbd_client_session_close(NbdClientSession *client)

{

    struct nbd_request request = {

        .type = NBD_CMD_DISC,

        .from = 0,

        .len = 0

    };



    if (!client->bs) {

        return;

    }

    if (client->sock == -1) {

        return;

    }



    nbd_send_request(client->sock, &request);



    nbd_teardown_connection(client);

    client->bs = NULL;

}

void FUNC_0(NbdClientSession *VAR_0)

{

    struct nbd_request VAR_1 = {

        .type = NBD_CMD_DISC,

        .from = 0,

        .len = 0

    };



    if (!VAR_0->bs) {

        return;

    }

    if (VAR_0->sock == -1) {

        return;

    }



    nbd_send_request(VAR_0->sock, &VAR_1);



    nbd_teardown_connection(VAR_0);

    VAR_0->bs = NULL;

}

void FUNC_0(NbdClientSession *VAR_0)
{ struct nbd_request VAR_1 = { .type = NBD_CMD_DISC,
.from = 0,
.len = 0
}; if (!VAR_0->bs) { return; } if (VAR_0->sock == -1) { return; } nbd_send_request(VAR_0->sock, &VAR_1); nbd_teardown_connection(VAR_0); VAR_0->bs = NULL; }