forked from I2P_Developers/i2p.i2p
i2ptunnel: Fix streamr session registration
This commit is contained in:
@@ -60,6 +60,14 @@ public abstract class I2PTunnelTask extends EventDispatcherImpl {
|
||||
|
||||
public abstract boolean close(boolean forced);
|
||||
|
||||
/**
|
||||
* For tasks that don't call I2PTunnel.addSession() directly
|
||||
* @since 0.8.13
|
||||
*/
|
||||
public void connected(I2PSession session) {
|
||||
getTunnel().addSession(session);
|
||||
}
|
||||
|
||||
public void disconnected(I2PSession session) {
|
||||
routerDisconnected();
|
||||
getTunnel().removeSession(session);
|
||||
|
@@ -107,6 +107,7 @@ import net.i2p.util.Log;
|
||||
try {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(key);
|
||||
_session = client.createSession(in, tunnel.getClientOptions());
|
||||
connected(_session);
|
||||
} catch(Exception exc) {
|
||||
throw new RuntimeException("failed to create session", exc);
|
||||
}
|
||||
|
@@ -103,6 +103,7 @@ public class I2PTunnelUDPServerBase extends I2PTunnelTask implements Source, Sin
|
||||
|
||||
try {
|
||||
_session = client.createSession(privData, getTunnel().getClientOptions());
|
||||
connected(_session);
|
||||
} catch(I2PSessionException exc) {
|
||||
throw new RuntimeException("failed to create session", exc);
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
2012-02-20 zzz
|
||||
* i2ptunnel: Fix streamr session registration
|
||||
* Streaming: Fix race NPE (thx echelon)
|
||||
|
||||
2012-02-17 zzz
|
||||
|
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 15;
|
||||
public final static long BUILD = 16;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
|
Reference in New Issue
Block a user