diff --git a/core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java b/core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java index 09dab72ff429486a5456a615a47c64ce3ff58354..809492c4cca9d62d08265d04135909908e1aecc1 100644 --- a/core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java +++ b/core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java @@ -9,6 +9,7 @@ package net.i2p.client.impl; * */ +import java.io.EOFException; import java.security.GeneralSecurityException; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -185,7 +186,16 @@ class RequestLeaseSetMessageHandler extends HandlerImpl { } catch (DataFormatException dfe) { session.propogateError("Error signing the leaseSet", dfe); } catch (I2PSessionException ise) { - session.propogateError("Error sending the signed leaseSet", ise); + if (session.isClosed()) { + // race, closed while signing leaseset + // EOFExceptions are logged at WARN level (see I2PSessionImpl.propogateError()) + // so the user won't see this + EOFException eof = new EOFException("Session closed while signing leaseset"); + eof.initCause(ise); + session.propogateError("Session closed while signing leaseset", eof); + } else { + session.propogateError("Error sending the signed leaseSet", ise); + } } }