mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
PostgresNode: wrap correctly around port number range end
Per note from Tom Lane
This commit is contained in:
@ -321,7 +321,8 @@ sub get_new_node
|
|||||||
|
|
||||||
while ($found == 0)
|
while ($found == 0)
|
||||||
{
|
{
|
||||||
$port++;
|
# wrap correctly around range end
|
||||||
|
$port = 49152 if ++$port >= 65536;
|
||||||
print "# Checking for port $port\n";
|
print "# Checking for port $port\n";
|
||||||
if (!TestLib::run_log([ 'pg_isready', '-p', $port ]))
|
if (!TestLib::run_log([ 'pg_isready', '-p', $port ]))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user