SSH2: use exceptions rather than user_error

This commit is contained in:
terrafrost 2021-11-11 19:39:49 -06:00
parent 15263f0c9c
commit 779e11e496

View File

@ -3335,8 +3335,8 @@ class SSH2
$raw = stream_get_contents($this->fsock, $this->decrypt_block_size); $raw = stream_get_contents($this->fsock, $this->decrypt_block_size);
if (!strlen($raw)) { if (!strlen($raw)) {
user_error('No data received from server'); $this->bitmap = 0;
return false; throw new ConnectionClosedException('No data received from server');
} }
if ($this->decrypt) { if ($this->decrypt) {