From 6d0b9ce80809d77309c4e338ddfd5b810022a557 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 17 Jan 2023 16:31:11 +0100 Subject: Thrift: Silence another exception --- src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java b/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java index 3699267..0f96788 100644 --- a/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java +++ b/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java @@ -90,7 +90,8 @@ public class TBinaryProtocolSafe extends TBinaryProtocol // ignore there. Let's hope it will stay ignored in the future. throw new TTransportException( TTransportException.END_OF_FILE ); } - } else if ( e.getCause() instanceof SocketException && e.getCause().getMessage().contains( " timed out" ) ) { + } else if ( e.getCause() instanceof SocketException + && ( e.getCause().getMessage().contains( " timed out" ) || e.getCause().getMessage().contains( "Connection reset" ) ) ) { // Faaaake throw new TTransportException( TTransportException.END_OF_FILE ); } else if ( e.getMessage().contains( "larger than max length" ) ) { -- cgit v1.2.3-55-g7522