Do it together with fast-fail disconnect. When kept separately
it can launch even if there are no new clients coming.
This causes problem with permanently dead dbs/users, as the
retry will not stop if all clients are gone.
disconnect_server(server, true, "too many servers in the pool");
many--;
}
-
- /*
- * Because of fast-fail we may not have any waiting clients that would
- * trigger server re-connect. So do it explicitly.
- */
- if (cur == 0 && pool->last_connect_failed)
- launch_new_connection(pool);
}
/* maintain servers in a pool */
if (!server && pool->last_connect_failed) {
int cnt = pool_server_count(pool) - statlist_count(&pool->new_server_list);
if (!cnt) {
+ /* usual relaunch wont work, as there are no waiting clients */
+ launch_new_connection(client->pool);
+
disconnect_client(client, true, "no working server connection");
return false;
}