Function deinit [src]
Frees all resources associated with the request.
Prototype
pub fn deinit(req: *Request) void
Parameters
req: *Request
Source
pub fn deinit(req: *Request) void {
if (req.connection) |connection| {
if (!req.response.parser.done) {
// If the response wasn't fully read, then we need to close the connection.
connection.closing = true;
}
req.client.connection_pool.release(req.client.allocator, connection);
}
req.* = undefined;
}