SimpleSession doesnt need a notifier thread

This commit is contained in:
zzz
2010-12-04 20:39:40 +00:00
parent 3d759d76cf
commit 04af255045

View File

@ -52,7 +52,6 @@ class I2PSimpleSession extends I2PSessionImpl2 {
_handlerMap = new SimpleMessageHandlerMap(context); _handlerMap = new SimpleMessageHandlerMap(context);
_closed = true; _closed = true;
_closing = false; _closing = false;
_availabilityNotifier = new AvailabilityNotifier();
if (options == null) if (options == null)
options = System.getProperties(); options = System.getProperties();
loadConfig(options); loadConfig(options);
@ -68,9 +67,6 @@ class I2PSimpleSession extends I2PSessionImpl2 {
@Override @Override
public void connect() throws I2PSessionException { public void connect() throws I2PSessionException {
_closed = false; _closed = false;
_availabilityNotifier.stopNotifying();
Thread notifier = new I2PAppThread(_availabilityNotifier, "Simple Notifier", true);
notifier.start();
try { try {
// If we are in the router JVM, connect using the interal queue // If we are in the router JVM, connect using the interal queue
@ -93,6 +89,7 @@ class I2PSimpleSession extends I2PSessionImpl2 {
InputStream in = _socket.getInputStream(); InputStream in = _socket.getInputStream();
_reader = new I2CPMessageReader(in, this); _reader = new I2CPMessageReader(in, this);
} }
// we do not receive payload messages, so we do not need an AvailabilityNotifier
_reader.startReading(); _reader.startReading();
} catch (UnknownHostException uhe) { } catch (UnknownHostException uhe) {