mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
fix connection error checking
This commit is contained in:
parent
f4d8bca8fa
commit
afc829d422
1 changed files with 7 additions and 1 deletions
|
|
@ -54,12 +54,18 @@ class Server extends AbstractServer {
|
||||||
if (!$connection->isValid()) {
|
if (!$connection->isValid()) {
|
||||||
throw new ConnectionException($connection->readLine());
|
throw new ConnectionException($connection->readLine());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parser = new Parser($this->timezoneProvider);
|
||||||
|
|
||||||
$output = $connection->readAll();
|
$output = $connection->readAll();
|
||||||
|
if (isset($output[0])) {
|
||||||
|
$parser->checkConnectionError($output[0]);
|
||||||
|
}
|
||||||
|
|
||||||
// sometimes we get an empty line first
|
// sometimes we get an empty line first
|
||||||
if (count($output) < 2) {
|
if (count($output) < 2) {
|
||||||
$output = $connection->readAll();
|
$output = $connection->readAll();
|
||||||
}
|
}
|
||||||
$parser = new Parser($this->timezoneProvider);
|
|
||||||
|
|
||||||
if (isset($output[0])) {
|
if (isset($output[0])) {
|
||||||
$parser->checkConnectionError($output[0]);
|
$parser->checkConnectionError($output[0]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue