mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-08 14:51:00 +00:00
Revert risky while-loop change, too fancy
This commit is contained in:
parent
d9d2ba59cd
commit
18d4c79bd4
@ -4481,12 +4481,14 @@ class SSH2
|
||||
protected function send_channel_packet($client_channel, $data)
|
||||
{
|
||||
while (strlen($data)) {
|
||||
while (!$this->window_size_client_to_server[$client_channel]) {
|
||||
if ($this->isTimeout()) {
|
||||
throw new TimeoutException('Timed out waiting for server');
|
||||
}
|
||||
if (!$this->window_size_client_to_server[$client_channel]) {
|
||||
// using an invalid channel will let the buffers be built up for the valid channels
|
||||
$this->get_channel_packet(-$client_channel);
|
||||
if ($this->isTimeout()) {
|
||||
throw new TimeoutException('Timed out waiting for server');
|
||||
} elseif (!$this->window_size_client_to_server[$client_channel]) {
|
||||
throw new \RuntimeException('Client to server window was not adjusted');
|
||||
}
|
||||
}
|
||||
|
||||
/* The maximum amount of data allowed is determined by the maximum
|
||||
|
Loading…
Reference in New Issue
Block a user