The conn->peer member is only not NULL when the connection is associated with a
peer object. If it is not, http_client_connection_server_close() will crash.
Fixed by doing the peer->client operations only when there is an associated peer.
{
struct http_client_connection *conn = *_conn;
struct http_client_peer *peer = conn->peer;
- struct http_client *client = peer->client;
struct http_client_request *req, **req_idx;
e_debug(conn->event, "Server explicitly closed connection");
}
array_clear(&conn->request_wait_list);
- if (client != NULL && client->waiting)
- io_loop_stop(client->ioloop);
+ if (peer != NULL) {
+ struct http_client *client = peer->client;
+
+ if (client->waiting)
+ io_loop_stop(client->ioloop);
+ }
http_client_connection_close(_conn);
}