diff options
author | Simon Rettberg | 2022-11-08 14:20:12 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-11-08 14:20:12 +0100 |
commit | 1370d25c2ff8435fd0eded305c44b359712b3b53 (patch) | |
tree | 11797d1470112a75b12dfd9d63ba5ab0b10995ed | |
parent | [thrift] Ignore certain SSL and connection errors (diff) | |
download | master-sync-shared-1370d25c2ff8435fd0eded305c44b359712b3b53.tar.gz master-sync-shared-1370d25c2ff8435fd0eded305c44b359712b3b53.tar.xz master-sync-shared-1370d25c2ff8435fd0eded305c44b359712b3b53.zip |
[thrift] One more exception to suppress
-rw-r--r-- | src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java b/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java index df526e3..3699267 100644 --- a/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java +++ b/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java @@ -1,5 +1,6 @@ package org.openslx.thrifthelper; +import java.net.SocketException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -89,6 +90,9 @@ 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" ) ) { + // Faaaake + throw new TTransportException( TTransportException.END_OF_FILE ); } else if ( e.getMessage().contains( "larger than max length" ) ) { // Also fake, since this one prints a whole stack trace compared to the other // message by AbstractNonblockingServer |