Skip to content

Commit

Permalink
Fix connection->read() when first line is not prompt.
Browse files Browse the repository at this point in the history
  • Loading branch information
ariselseng authored and icewind1991 committed Mar 4, 2019
1 parent 3cf60dc commit 464459a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ public function read(callable $callback = null) {
$this->parser->checkConnectionError($promptLine);

$output = array();
$line = $this->readLine();
if (!$this->isPrompt($promptLine)) {
$line = $promptLine;
} else {
$line = $this->readLine();
}
if ($line === false) {
$this->unknownError($promptLine);
}
Expand Down

0 comments on commit 464459a

Please sign in to comment.