Skip to content

Commit 72fb482

Browse files
abnegateclaude
andcommitted
(fix): keep echo backend alive for multi-send test, fix PHPStan type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3ada034 commit 72fb482

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/Integration/TCPServerTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ public function testTCPAdapterGetConnectionAndClose(): void
4040

4141
Coroutine::create(function () use ($backend): void {
4242
$backend->handle(function (Coroutine\Server\Connection $connection): void {
43-
$data = $connection->recv();
44-
if ($data !== '' && $data !== false) {
43+
while (true) {
44+
$data = $connection->recv();
45+
if (! \is_string($data) || $data === '') {
46+
break;
47+
}
4548
$connection->send($data);
4649
}
4750
$connection->close();

0 commit comments

Comments
 (0)