mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
improve error handling
This commit is contained in:
parent
80a4edf0ef
commit
26ec766638
3 changed files with 10 additions and 12 deletions
|
|
@ -101,14 +101,9 @@ class RawConnection {
|
|||
* @param string $input
|
||||
*/
|
||||
public function write($input) {
|
||||
if (@fwrite($this->getInputStream(), $input) === false) {
|
||||
$error = error_get_last();
|
||||
if ($error && strpos($error['message'], "errno=32")) {
|
||||
error_clear_last();
|
||||
throw new ConnectionResetException();
|
||||
}
|
||||
}
|
||||
$result = @fwrite($this->getInputStream(), $input);
|
||||
fflush($this->getInputStream());
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue