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:
jrandom
2005-02-23 04:20:28 +00:00
committed by zzz
parent 8a21f0efec
commit 10ed058c2e
11 changed files with 111 additions and 200 deletions

View File

@ -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.