mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-10 15:48:41 +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)
|
protected function send_channel_packet($client_channel, $data)
|
||||||
{
|
{
|
||||||
while (strlen($data)) {
|
while (strlen($data)) {
|
||||||
while (!$this->window_size_client_to_server[$client_channel]) {
|
if (!$this->window_size_client_to_server[$client_channel]) {
|
||||||
if ($this->isTimeout()) {
|
|
||||||
throw new TimeoutException('Timed out waiting for server');
|
|
||||||
}
|
|
||||||
// using an invalid channel will let the buffers be built up for the valid channels
|
// using an invalid channel will let the buffers be built up for the valid channels
|
||||||
$this->get_channel_packet(-$client_channel);
|
$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
|
/* The maximum amount of data allowed is determined by the maximum
|
||||||
|
Loading…
x
Reference in New Issue
Block a user