Skip to content

Commit e3a3370

Browse files
KurtThiemannnicolas-grekas
authored andcommitted
ignore RuntimeExceptions thrown when trying to seek start of PSR-7 stream in createPsr7Response
1 parent e46482c commit e3a3370

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/HttpClient/Internal/HttplugWaitLoop.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ public static function createPsr7Response(ResponseFactoryInterface $responseFact
145145
}
146146

147147
if ($body->isSeekable()) {
148-
$body->seek(0);
148+
try {
149+
$body->seek(0);
150+
} catch (\RuntimeException) {
151+
// ignore
152+
}
149153
}
150154

151155
return $psrResponse->withBody($body);

0 commit comments

Comments
 (0)