@@ -82,6 +82,7 @@ public static function create(UriInterface $uri, AuthenticateInterface $auth, Dr
82
82
$ semaphore ,
83
83
BoltFactory::create (),
84
84
new ConnectionRequestData (
85
+ $ uri ->getHost (),
85
86
$ uri ,
86
87
$ auth ,
87
88
$ conf ->getUserAgent (),
@@ -92,9 +93,10 @@ public static function create(UriInterface $uri, AuthenticateInterface $auth, Dr
92
93
);
93
94
}
94
95
95
- public function createOrGetPool (UriInterface $ uri ): ConnectionPool
96
+ public function createOrGetPool (string $ hostname , UriInterface $ uri ): ConnectionPool
96
97
{
97
98
$ data = new ConnectionRequestData (
99
+ $ hostname ,
98
100
$ uri ,
99
101
$ this ->data ->getAuth (),
100
102
$ this ->data ->getUserAgent (),
@@ -130,7 +132,7 @@ public function acquire(SessionConfiguration $config): Generator
130
132
foreach ($ addresses as $ address ) {
131
133
$ triedAddresses [] = $ address ;
132
134
133
- $ pool = $ this ->createOrGetPool ($ this ->data ->getUri ()->withHost ($ address ));
135
+ $ pool = $ this ->createOrGetPool ($ this ->data ->getUri ()->getHost (), $ this -> data -> getUri ()-> withHost ($ address ));
134
136
try {
135
137
/** @var BoltConnection $connection */
136
138
$ connection = GeneratorHelper::getReturnFromGenerator ($ pool ->acquire ($ config ));
@@ -158,7 +160,7 @@ public function acquire(SessionConfiguration $config): Generator
158
160
$ server = $ server ->withScheme ($ this ->data ->getUri ()->getScheme ());
159
161
}
160
162
161
- return $ this ->createOrGetPool ($ server )->acquire ($ config );
163
+ return $ this ->createOrGetPool ($ this -> data -> getUri ()-> getHost (), $ server )->acquire ($ config );
162
164
}
163
165
164
166
/**
@@ -200,7 +202,7 @@ private function routingTable(BoltConnection $connection, SessionConfiguration $
200
202
201
203
public function release (ConnectionInterface $ connection ): void
202
204
{
203
- $ this ->createOrGetPool ($ connection ->getServerAddress ())->release ($ connection );
205
+ $ this ->createOrGetPool ($ connection ->getServerAddress ()-> getHost (), $ connection -> getServerAddress () )->release ($ connection );
204
206
}
205
207
206
208
private function createKey (ConnectionRequestData $ data , ?SessionConfiguration $ config = null ): string
0 commit comments