summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java4
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