Skip to content

Commit 5045505

Browse files
committed
reattach the port
1 parent 16052ef commit 5045505

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Neo4j/Neo4jConnectionPool.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ public function acquire(SessionConfiguration $config): Generator
129129
})();
130130
foreach ($addresses as $address) {
131131
$triedAddresses[] = $address;
132-
$pool = $this->createOrGetPool(Uri::create($address));
132+
133+
$uri = Uri::create($address);
134+
$port = $this->data->getUri()->getPort();
135+
if ($port !== null) {
136+
$uri = $uri->withPort($port);
137+
}
138+
139+
$pool = $this->createOrGetPool($uri);
133140
try {
134141
/** @var BoltConnection $connection */
135142
$connection = GeneratorHelper::getReturnFromGenerator($pool->acquire($config));

0 commit comments

Comments
 (0)