Skip to content

Commit

Permalink
Cap max_connections to MAX_NUMBER_OF_CONNECTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed Jul 23, 2020
1 parent 499c473 commit 14ca7b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libpgagroal/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,11 @@ pgagroal_validate_configuration(void* shmem)
return 1;
}

if (config->max_connections > MAX_NUMBER_OF_CONNECTIONS)
{
config->max_connections = MAX_NUMBER_OF_CONNECTIONS;
}

if (config->number_of_servers <= 0)
{
ZF_LOGF("pgagroal: No servers defined");
Expand Down

0 comments on commit 14ca7b9

Please sign in to comment.