forked from I2P_Developers/i2p.i2p
2005-02-22 jrandom
* Reworked the tunnel (re)building process to remove the tokens and
provide cleaner controls on the tunnels built.
* Fixed situations where the timestamper wanted to test more servers than
were provided (thanks Tracker!)
* Get rid of the dead SAM sessions by using the streaming lib's callbacks
(thanks Tracker!)
This commit is contained in:
@@ -132,6 +132,8 @@ public class SAMStreamSession {
|
||||
if (socketMgr == null) {
|
||||
throw new SAMException("Error creating I2PSocketManager");
|
||||
}
|
||||
|
||||
socketMgr.addDisconnectListener(new DisconnectListener());
|
||||
|
||||
forceFlush = Boolean.valueOf(allprops.getProperty(PROP_FORCE_FLUSH, DEFAULT_FORCE_FLUSH)).booleanValue();
|
||||
|
||||
@@ -156,6 +158,12 @@ public class SAMStreamSession {
|
||||
t.start();
|
||||
}
|
||||
}
|
||||
|
||||
private class DisconnectListener implements I2PSocketManager.DisconnectListener {
|
||||
public void sessionDisconnected() {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SAM STREAM session Destination.
|
||||
|
||||
Reference in New Issue
Block a user