mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
improve error handling during connect
This commit is contained in:
parent
89f47cfdf2
commit
526f14707e
2 changed files with 8 additions and 0 deletions
|
|
@ -34,10 +34,14 @@ class Connection extends RawConnection {
|
|||
parent::write($input . PHP_EOL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ConnectException
|
||||
*/
|
||||
public function clearTillPrompt() {
|
||||
$this->write('');
|
||||
do {
|
||||
$promptLine = $this->readLine();
|
||||
$this->parser->checkConnectionError($promptLine);
|
||||
} while (!$this->isPrompt($promptLine));
|
||||
$this->write('');
|
||||
$this->readLine();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue