static void
http_client_peer_connect(struct http_client_peer *peer, unsigned int count)
{
- peer->connecting = TRUE;
-
if (http_client_peer_shared_start_backoff_timer(peer->shared)) {
peer->connect_backoff = TRUE;
return;
e_debug(peer->event, "Peer cancel");
- peer->connecting = FALSE;
-
/* make a copy of the connection array; freed connections modify it */
t_array_init(&conns, array_count(&peer->conns));
array_copy(&conns.arr, 0, &peer->conns.arr, 0, array_count(&peer->conns));
struct http_client_peer_pool *ppool = peer->ppool;
struct http_client_queue *const *queue;
- peer->connecting = FALSE;
-
http_client_peer_pool_connection_success(ppool);
e_debug(peer->event, "Successfully connected (connections=%u)",
{
struct http_client_queue *const *queue;
- if (!peer->connecting)
- return;
- peer->connecting = FALSE;
-
e_debug(peer->event, "Connection failed: %s", reason);
/* failed to make any connection. a second connect will probably also
/* zero time-out for consolidating request handling */
struct timeout *to_req_handling;
- bool connecting:1; /* peer is waiting to be connected */
bool connect_backoff:1; /* peer is waiting for backoff timout*/
bool disconnected:1; /* peer is already disconnected */
bool handling_requests:1;/* currently running request handler */