From b48dfc0927e4aabe887f4491819d10277312f092 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 3 Apr 2020 16:52:09 +0200 Subject: [PATCH] add network reset error, fix connection reset --- src/Exception/ConnectionAbortedException.php | 11 +++++++++++ src/Exception/ConnectionResetException.php | 11 +++++++++++ src/Native/NativeState.php | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 src/Exception/ConnectionAbortedException.php create mode 100644 src/Exception/ConnectionResetException.php diff --git a/src/Exception/ConnectionAbortedException.php b/src/Exception/ConnectionAbortedException.php new file mode 100644 index 0000000..59363ca --- /dev/null +++ b/src/Exception/ConnectionAbortedException.php @@ -0,0 +1,11 @@ + + * This file is licensed under the Licensed under the MIT license: + * http://opensource.org/licenses/MIT + */ + +namespace Icewind\SMB\Exception; + +class ConnectionAbortedException extends ConnectException { +} diff --git a/src/Exception/ConnectionResetException.php b/src/Exception/ConnectionResetException.php new file mode 100644 index 0000000..d5ac10d --- /dev/null +++ b/src/Exception/ConnectionResetException.php @@ -0,0 +1,11 @@ + + * This file is licensed under the Licensed under the MIT license: + * http://opensource.org/licenses/MIT + */ + +namespace Icewind\SMB\Exception; + +class ConnectionResetException extends ConnectException { +} diff --git a/src/Native/NativeState.php b/src/Native/NativeState.php index 0792b2f..8fd274d 100644 --- a/src/Native/NativeState.php +++ b/src/Native/NativeState.php @@ -16,6 +16,7 @@ use Icewind\SMB\Exception\HostDownException; use Icewind\SMB\Exception\InvalidArgumentException; use Icewind\SMB\Exception\InvalidTypeException; +use Icewind\SMB\Exception\ConnectionAbortedException; use Icewind\SMB\Exception\NoRouteToHostException; use Icewind\SMB\Exception\NotEmptyException; use Icewind\SMB\Exception\NotFoundException; @@ -49,6 +50,7 @@ class NativeState { 22 => InvalidArgumentException::class, 28 => OutOfSpaceException::class, 39 => NotEmptyException::class, + 103 => ConnectionAbortedException::class, 104 => ConnectionResetException::class, 110 => TimedOutException::class, 111 => ConnectionRefusedException::class,