Batched SFTP reads: no more batches on a connection whose server did not confirm a close

This commit is contained in:
2026-10-11 14:05:29 +02:00
parent 0a9bd963fb
commit b3c8068f8d
2 changed files with 19 additions and 3 deletions
@@ -286,6 +286,8 @@ class SftpReadStreamTest extends TestCase {
$this->assertSame('file 31', $got['31']);
$this->assertNull($got['32'], 'no second batch after unconfirmed closes');
$this->assertCount(SftpReadStream::BATCH, array_filter($got, fn ($v) => $v !== null));
// Nor on a later call over the same connection.
$this->assertNull(SftpReadStream::readMany(new FakeSftpStorage($sftp), ['0']));
}
public function testReadManyLeavesAMalformedAnswerToTheCaller(): void {