Skip to content

Commit 78e6091

Browse files
committed
Check also EofException as connection error (beside EOFException)
Signed-off-by: Markus Michels <markus7017@gmail.com>
1 parent db335b5 commit 78e6091

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyApiException.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import org.eclipse.jdt.annotation.NonNullByDefault;
3030
import org.eclipse.jdt.annotation.Nullable;
31+
import org.eclipse.jetty.io.EofException;
3132

3233
import com.google.gson.JsonSyntaxException;
3334

@@ -116,7 +117,8 @@ public boolean isConnectionError() {
116117
Class<?> exType = getCauseClass();
117118
return isUnknownHost() || isMalformedURL() || exType == ConnectException.class
118119
|| exType == SocketException.class || exType == PortUnreachableException.class
119-
|| exType == NoRouteToHostException.class || exType == EOFException.class;
120+
|| exType == NoRouteToHostException.class || exType == EofException.class
121+
|| exType == EOFException.class;
120122
}
121123

122124
public boolean isNoRouteToHost() {

0 commit comments

Comments
 (0)