Fix connection->read() when first line is not prompt.

Signed-off-by: Ari Selseng <ari@selseng.net>
This commit is contained in:
Ari Selseng 2019-03-01 16:43:46 +01:00
commit ebdada86f1

View file

@ -66,7 +66,11 @@ class Connection extends RawConnection {
$this->parser->checkConnectionError($promptLine); $this->parser->checkConnectionError($promptLine);
$output = []; $output = [];
$line = $this->readLine(); if (!$this->isPrompt($promptLine)) {
$line = $promptLine;
} else {
$line = $this->readLine();
}
if ($line === false) { if ($line === false) {
$this->unknownError($promptLine); $this->unknownError($promptLine);
} }