use of net.i2p.client.streaming.I2PServerSocket in project i2p.i2p by i2p.
the class SAMv3StreamSession method stopForwardingIncoming.
/**
* stop Forwarding Incoming connection coming from I2P
* @throws SAMException
* @throws InterruptedIOException
*/
public void stopForwardingIncoming() throws SAMException, InterruptedIOException {
SessionRecord rec = SAMv3Handler.sSessionsHash.get(nick);
if (rec == null)
throw new InterruptedIOException();
I2PServerSocket server = null;
synchronized (this.socketServerLock) {
if (this.socketServer == null) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("no socket server is defined for this destination");
throw new SAMException("no socket server is defined for this destination");
}
server = this.socketServer;
this.socketServer = null;
if (_log.shouldLog(Log.DEBUG))
_log.debug("nulling socketServer in stopForwardingIncoming. Object " + this);
}
try {
server.close();
} catch (I2PException e) {
}
}
Aggregations