From 99ceaedb5fc35111147beff1f6973aafdcd2db69 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 27 Nov 2024 13:19:59 +0100 Subject: [PATCH] [HttpClient] Fix primary_ip info when using amphp/http-client v5 --- Internal/AmpListenerV5.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Internal/AmpListenerV5.php b/Internal/AmpListenerV5.php index fe5d36e..fb8a0b7 100644 --- a/Internal/AmpListenerV5.php +++ b/Internal/AmpListenerV5.php @@ -66,7 +66,7 @@ public function connectionAcquired(Request $request, Connection $connection, int public function requestHeaderStart(Request $request, Stream $stream): void { - $host = $stream->getRemoteAddress()->toString(); + $host = $stream->getRemoteAddress()->getAddress(); $this->info['primary_ip'] = $host; if (str_contains($host, ':')) {