static inline vcl_test_server_conn_t *
conn_pool_alloc (vcl_test_server_worker_t * wrk)
{
- int i;
+ int i, expand = 0;
+again:
for (i = 0; i < wrk->conn_pool_size; i++)
{
if (!wrk->conn_pool[i].is_alloc)
}
}
+ if (expand == 0)
+ {
+ conn_pool_expand (wrk, 2 * wrk->conn_pool_size);
+ expand = 1;
+ goto again;
+ }
+ vtwrn ("Failed to allocate connection even after expand");
return 0;
}
return 1;
return (conn->stats.rx_bytes < 128
- || conn->stats.rx_bytes > conn->cfg.total_bytes);
+ || conn->stats.rx_bytes >= conn->cfg.total_bytes);
}
static sock_test_cfg_t *