Read ahead: a plan that cannot be made leaves the restore to the usual reads; only a whole buffered SFTP packet counts as an answer waiting

This commit is contained in:
2026-10-19 08:54:13 +02:00
parent c95f552cc6
commit 9b85221e50
4 changed files with 41 additions and 12 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ class SftpRangeFetcherTest extends TestCase {
$pair = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP);
$sockets[] = $pair;
$c->fsock = $pair[0];
$c->packet_buffer = 'more';
$c->packet_buffer = pack('N', 4) . 'more'; // a whole packet
}
$ranges = array_slice($this->ranges(), 0, 3);
$start = microtime(true);