Skip to content

Commit 13e536b

Browse files
abnegateclaude
andcommitted
(fix): getConnection routes but doesn't send — remove drain, send directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 55d48dd commit 13e536b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/Integration/TCPServerTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,17 @@ public function testTCPAdapterGetConnectionAndClose(): void
6161
$adapter->setTimeout(5.0);
6262
$adapter->setConnectTimeout(2.0);
6363

64-
// getConnection dials the backend and caches by fd
65-
$client = $adapter->getConnection('hello', 1);
64+
// getConnection dials the backend and caches by fd.
65+
// The $data arg is routing input (passed to route()),
66+
// not sent to the backend — the server does that.
67+
$client = $adapter->getConnection('routing-data', 1);
6668
$this->assertInstanceOf(Client::class, $client);
6769
$this->assertTrue($client->isConnected());
6870

6971
// Same fd returns cached connection
7072
$cached = $adapter->getConnection('ignored', 1);
7173
$this->assertSame($client, $cached);
7274

73-
// Drain the echo from the initial 'hello' handshake
74-
$echo = $client->recv(1.0);
75-
$this->assertSame('hello', $echo);
76-
7775
// Send/recv through the established connection
7876
$client->send('ping');
7977
$response = $client->recv(1.0);

0 commit comments

Comments
 (0)