Merge branch '2.0' into 3.0

This commit is contained in:
terrafrost 2022-06-14 00:03:13 -05:00
commit fbf6027a43
1 changed files with 5 additions and 1 deletions

View File

@ -3295,7 +3295,11 @@ class SSH2
if (!is_resource($this->fsock) || feof($this->fsock)) {
$this->bitmap = 0;
throw new ConnectionClosedException('Connection closed (by server) prematurely ' . $elapsed . 's');
$str = 'Connection closed (by server) prematurely';
if (isset($elapsed)) {
$str.= ' ' . $elapsed . 's';
}
throw new ConnectionClosedException($str);
}
$start = microtime(true);