I2CP: Return null on decompression failure instead of

throwing exception, to reduce the impact, for example
in iMule which is apparently closing the session (ticket #1915)
This commit is contained in:
zzz
2017-02-15 17:48:47 +00:00
parent 8a89b3da29
commit 380f55a0e8
3 changed files with 8 additions and 2 deletions

View File

@ -323,7 +323,10 @@ class I2PSessionImpl2 extends I2PSessionImpl {
try {
return DataHelper.decompress(compressed);
} catch (IOException ioe) {
throw new I2PSessionException("Error decompressing message", ioe);
//throw new I2PSessionException("Error decompressing message", ioe);
if (_log.shouldWarn())
_log.warn("Error decompressing message", ioe);
return null;
}
}
return compressed;

View File

@ -1,4 +1,7 @@
2017-02-15 zzz
* Build: Fix calls to Class.newInstance() deprecated in Java 9
* I2CP: Return null on decompression failure instead of
throwing exception (ticket #1915)
* Utils: Disable caching of ResettableGZIPOutputStreams,
add more checks for compression failure,
fix output for zero-length input (ticket #1915)

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 7;
public final static long BUILD = 8;
/** for example "-test" */
public final static String EXTRA = "";