fix SimpleSession NPE

This commit is contained in:
zzz
2010-12-04 21:18:37 +00:00
parent b42967848e
commit 0b2bc726df
2 changed files with 4 additions and 1 deletions

View File

@ -659,6 +659,8 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
propogateError("Error destroying the session", ipe); propogateError("Error destroying the session", ipe);
} }
} }
// SimpleSession does not initialize
if (_availabilityNotifier != null)
_availabilityNotifier.stopNotifying(); _availabilityNotifier.stopNotifying();
_closed = true; _closed = true;
_closing = false; _closing = false;

View File

@ -47,6 +47,7 @@ class I2PSimpleSession extends I2PSessionImpl2 {
* @throws I2PSessionException if there is a problem * @throws I2PSessionException if there is a problem
*/ */
public I2PSimpleSession(I2PAppContext context, Properties options) throws I2PSessionException { public I2PSimpleSession(I2PAppContext context, Properties options) throws I2PSessionException {
// Warning, does not call super()
_context = context; _context = context;
_log = context.logManager().getLog(I2PSimpleSession.class); _log = context.logManager().getLog(I2PSimpleSession.class);
_handlerMap = new SimpleMessageHandlerMap(context); _handlerMap = new SimpleMessageHandlerMap(context);