From 3ddd5f2a516e3af5acf3e6b923ef1f12d5aa5216 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 22 Apr 2009 19:21:21 +0000
Subject: [PATCH] * Fragmenter: don't re-throw the corrupt fragment
 IllegalStateException,   to limit the damage - root cause still not found

---
 .../src/net/i2p/router/tunnel/FragmentHandler.java  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/router/java/src/net/i2p/router/tunnel/FragmentHandler.java b/router/java/src/net/i2p/router/tunnel/FragmentHandler.java
index 7261845c1a..43e1d13144 100644
--- a/router/java/src/net/i2p/router/tunnel/FragmentHandler.java
+++ b/router/java/src/net/i2p/router/tunnel/FragmentHandler.java
@@ -106,7 +106,18 @@ public class FragmentHandler {
             if (_log.shouldLog(Log.ERROR))
                 _log.error("Corrupt fragment received: offset = " + offset, e);
             _context.statManager().addRateData("tunnel.corruptMessage", 1, 1);
-            throw e;
+            // java.lang.IllegalStateException: wtf, don't get the completed size when we're not complete - null fragment i=0 of 1
+            // at net.i2p.router.tunnel.FragmentedMessage.getCompleteSize(FragmentedMessage.java:194)
+            // at net.i2p.router.tunnel.FragmentedMessage.toByteArray(FragmentedMessage.java:223)
+            // at net.i2p.router.tunnel.FragmentHandler.receiveComplete(FragmentHandler.java:380)
+            // at net.i2p.router.tunnel.FragmentHandler.receiveSubsequentFragment(FragmentHandler.java:353)
+            // at net.i2p.router.tunnel.FragmentHandler.receiveFragment(FragmentHandler.java:208)
+            // at net.i2p.router.tunnel.FragmentHandler.receiveTunnelMessage(FragmentHandler.java:92)
+            // ...
+            // still trying to find root cause
+            // let's limit the damage here and skip the:
+            // .transport.udp.MessageReceiver: b0rked receiving a message.. wazza huzza hmm?
+            //throw e;
         } finally {
             // each of the FragmentedMessages populated make a copy out of the
             // payload, which they release separately, so we can release 
-- 
GitLab