mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
github ci
This commit is contained in:
parent
58f6df3807
commit
80a4edf0ef
9 changed files with 144 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ namespace Icewind\SMB\Wrapped;
|
|||
|
||||
use Icewind\SMB\Exception\ConnectException;
|
||||
use Icewind\SMB\Exception\ConnectionException;
|
||||
use Icewind\SMB\Exception\ConnectionResetException;
|
||||
|
||||
class RawConnection {
|
||||
/**
|
||||
|
|
@ -100,7 +101,13 @@ class RawConnection {
|
|||
* @param string $input
|
||||
*/
|
||||
public function write($input) {
|
||||
fwrite($this->getInputStream(), $input);
|
||||
if (@fwrite($this->getInputStream(), $input) === false) {
|
||||
$error = error_get_last();
|
||||
if ($error && strpos($error['message'], "errno=32")) {
|
||||
error_clear_last();
|
||||
throw new ConnectionResetException();
|
||||
}
|
||||
}
|
||||
fflush($this->getInputStream());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue