Beispiel #1
0
void Connection_destroy(Connection *conn)
{
    if(conn) {
        Request_destroy(conn->req);
        conn->req = NULL;
        IOBuf_destroy(conn->iob);
        IOBuf_destroy(conn->proxy_iob);
        h_free(conn);
    }
}
Beispiel #2
0
void Connection_destroy(Connection *conn)
{
    if(conn) {
        Connection_deliver_task_kill(conn);
        Request_destroy(conn->req);
        conn->req = NULL;
        if(conn->client) free(conn->client);
        IOBuf_destroy(conn->iob);
        IOBuf_destroy(conn->proxy_iob);
        free(conn);
    }
}
Beispiel #3
0
int connection_proxy_close(Connection *conn)
{
    IOBuf_destroy(conn->proxy_iob);
    conn->proxy_iob = NULL;

    return CLOSE;
}
Beispiel #4
0
static inline int close_or_error(Connection *conn, int next)
{

    IOBuf_destroy(conn->proxy_iob);
    conn->proxy_iob = NULL;

    check_debug(Register_disconnect(IOBuf_fd(conn->iob)) != -1,
            "Register disconnect didn't work for %d", IOBuf_fd(conn->iob));

error:
    // fallthrough on purpose
    return next;
}