propagate from branch 'i2p.i2p.zzz.test' (head c021d3213ed91036828c43f1e93916e319d47bc1)
to branch 'i2p.i2p' (head f571e6566b12cd0ae93fd57157b849d5a963612f)
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
compile.on.save=false
|
||||||
do.depend=false
|
do.depend=false
|
||||||
do.jar=true
|
do.jar=true
|
||||||
javac.debug=true
|
javac.debug=true
|
||||||
|
@ -30,13 +30,31 @@ file.reference.mstreaming.jar-1=../ministreaming/java/build/mstreaming.jar
|
|||||||
file.reference.NetBeansProjects-i2p.i2p=../i2p.i2p/
|
file.reference.NetBeansProjects-i2p.i2p=../i2p.i2p/
|
||||||
file.reference.streaming.jar=../../bob/i2p/i2p.i2p/build/streaming.jar
|
file.reference.streaming.jar=../../bob/i2p/i2p.i2p/build/streaming.jar
|
||||||
file.reference.streaming.jar-1=../streaming/java/build/streaming.jar
|
file.reference.streaming.jar-1=../streaming/java/build/streaming.jar
|
||||||
|
file.reference.wrapper-freebsd=../../installer/lib/wrapper/freebsd/
|
||||||
|
file.reference.wrapper-linux=../../installer/lib/wrapper/linux/
|
||||||
|
file.reference.wrapper-linux64=../../installer/lib/wrapper/linux64/
|
||||||
|
file.reference.wrapper-macosx=../../installer/lib/wrapper/macosx/
|
||||||
|
file.reference.wrapper-solaris=../../installer/lib/wrapper/solaris/
|
||||||
|
file.reference.wrapper-win32=../../installer/lib/wrapper/win32/
|
||||||
|
file.reference.wrapper.jar=../../installer/lib/wrapper/linux/wrapper.jar
|
||||||
|
file.reference.wrapper.jar-1=../../installer/lib/wrapper/freebsd/wrapper.jar
|
||||||
|
file.reference.wrapper.jar-2=../../installer/lib/wrapper/linux64/wrapper.jar
|
||||||
|
file.reference.wrapper.jar-3=../../installer/lib/wrapper/macosx/wrapper.jar
|
||||||
|
file.reference.wrapper.jar-4=../../installer/lib/wrapper/solaris/wrapper.jar
|
||||||
|
file.reference.wrapper.jar-5=../../installer/lib/wrapper/win32/wrapper.jar
|
||||||
includes=**
|
includes=**
|
||||||
jar.compress=false
|
jar.compress=false
|
||||||
javac.classpath=\
|
javac.classpath=\
|
||||||
${file.reference.i2p.jar-1}:\
|
${file.reference.i2p.jar-1}:\
|
||||||
${file.reference.i2ptunnel.jar}:\
|
${file.reference.i2ptunnel.jar}:\
|
||||||
${file.reference.mstreaming.jar-1}:\
|
${file.reference.mstreaming.jar-1}:\
|
||||||
${file.reference.streaming.jar-1}
|
${file.reference.streaming.jar-1}:\
|
||||||
|
${file.reference.wrapper.jar-1}:\
|
||||||
|
${file.reference.wrapper.jar}:\
|
||||||
|
${file.reference.wrapper.jar-2}:\
|
||||||
|
${file.reference.wrapper.jar-3}:\
|
||||||
|
${file.reference.wrapper.jar-4}:\
|
||||||
|
${file.reference.wrapper.jar-5}
|
||||||
# Space-separated list of extra javac options
|
# Space-separated list of extra javac options
|
||||||
javac.compilerargs=
|
javac.compilerargs=
|
||||||
javac.deprecation=false
|
javac.deprecation=false
|
||||||
|
@ -115,13 +115,23 @@ public class BOB {
|
|||||||
private static int maxConnections = 0;
|
private static int maxConnections = 0;
|
||||||
private static NamedDB database;
|
private static NamedDB database;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log a warning
|
||||||
|
*
|
||||||
|
* @param arg
|
||||||
|
*/
|
||||||
|
public static void info(String arg) {
|
||||||
|
System.out.println("INFO:" + arg);
|
||||||
|
_log.info(arg);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a warning
|
* Log a warning
|
||||||
*
|
*
|
||||||
* @param arg
|
* @param arg
|
||||||
*/
|
*/
|
||||||
public static void warn(String arg) {
|
public static void warn(String arg) {
|
||||||
System.out.println(arg);
|
System.out.println("WARNING:" + arg);
|
||||||
_log.warn(arg);
|
_log.warn(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +141,7 @@ public class BOB {
|
|||||||
* @param arg
|
* @param arg
|
||||||
*/
|
*/
|
||||||
public static void error(String arg) {
|
public static void error(String arg) {
|
||||||
System.out.println(arg);
|
System.out.println("ERROR: " + arg);
|
||||||
_log.error(arg);
|
_log.error(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,12 +212,12 @@ public class BOB {
|
|||||||
props.store(fo, configLocation);
|
props.store(fo, configLocation);
|
||||||
fo.close();
|
fo.close();
|
||||||
} catch(IOException ioe) {
|
} catch(IOException ioe) {
|
||||||
warn("IOException on BOB config file " + configLocation + ", " + ioe);
|
error("IOException on BOB config file " + configLocation + ", " + ioe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
warn("BOB is now running.");
|
info("BOB is now running.");
|
||||||
ServerSocket listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST)));
|
ServerSocket listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST)));
|
||||||
Socket server;
|
Socket server;
|
||||||
|
|
||||||
@ -220,7 +230,7 @@ public class BOB {
|
|||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
} catch(IOException ioe) {
|
} catch(IOException ioe) {
|
||||||
warn("IOException on socket listen: " + ioe);
|
error("IOException on socket listen: " + ioe);
|
||||||
ioe.printStackTrace();
|
ioe.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public class DoCMDS implements Runnable {
|
|||||||
|
|
||||||
// FIX ME
|
// FIX ME
|
||||||
// I need a better way to do versioning, but this will do for now.
|
// I need a better way to do versioning, but this will do for now.
|
||||||
public static final String BMAJ = "00", BMIN = "00", BREV = "01", BEXT = "-D";
|
public static final String BMAJ = "00", BMIN = "00", BREV = "02", BEXT = "";
|
||||||
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
|
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
|
||||||
private Socket server;
|
private Socket server;
|
||||||
private Properties props;
|
private Properties props;
|
||||||
|
@ -70,7 +70,7 @@ public class I2Plistener implements Runnable {
|
|||||||
boolean g = false;
|
boolean g = false;
|
||||||
I2PSocket sessSocket = null;
|
I2PSocket sessSocket = null;
|
||||||
|
|
||||||
serverSocket.setSoTimeout(1000);
|
serverSocket.setSoTimeout(100);
|
||||||
database.getReadLock();
|
database.getReadLock();
|
||||||
info.getReadLock();
|
info.getReadLock();
|
||||||
if(info.exists("INPORT")) {
|
if(info.exists("INPORT")) {
|
||||||
@ -107,32 +107,31 @@ public class I2Plistener implements Runnable {
|
|||||||
// System.out.println("Exception " + e);
|
// System.out.println("Exception " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// System.out.println("I2Plistener: Close");
|
||||||
try {
|
try {
|
||||||
serverSocket.close();
|
serverSocket.close();
|
||||||
} catch(I2PException e) {
|
} catch(I2PException e) {
|
||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
|
|
||||||
while(Thread.activeCount() > tgwatch) { // wait for all threads in our threadgroup to finish
|
|
||||||
// System.out.println("STOP Thread count " + Thread.activeCount());
|
|
||||||
try {
|
|
||||||
Thread.sleep(1000); //sleep for 1000 ms (One second)
|
|
||||||
} catch(Exception e) {
|
|
||||||
// nop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// System.out.println("STOP Thread count " + Thread.activeCount());
|
|
||||||
// need to kill off the socket manager too.
|
// need to kill off the socket manager too.
|
||||||
I2PSession session = socketManager.getSession();
|
I2PSession session = socketManager.getSession();
|
||||||
if(session != null) {
|
if(session != null) {
|
||||||
|
// System.out.println("I2Plistener: destroySession");
|
||||||
try {
|
try {
|
||||||
session.destroySession();
|
session.destroySession();
|
||||||
} catch(I2PSessionException ex) {
|
} catch(I2PSessionException ex) {
|
||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
// System.out.println("destroySession Thread count " + Thread.activeCount());
|
}
|
||||||
|
// System.out.println("I2Plistener: Waiting for children");
|
||||||
|
while(Thread.activeCount() > tgwatch) { // wait for all threads in our threadgroup to finish
|
||||||
|
try {
|
||||||
|
Thread.sleep(100); //sleep for 100 ms (One tenth second)
|
||||||
|
} catch(Exception e) {
|
||||||
|
// nop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// System.out.println("I2Plistener: Done.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,20 +119,26 @@ die: {
|
|||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// System.out.println("I2PtoTCP: Going away...");
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
// System.out.println("I2PtoTCP: Owch! damn!");
|
||||||
break die;
|
break die;
|
||||||
}
|
}
|
||||||
} // die
|
} // die
|
||||||
try {
|
try {
|
||||||
|
// System.out.println("I2PtoTCP: Close I2P");
|
||||||
I2P.close();
|
I2P.close();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
tell = false;
|
tell = false;
|
||||||
}
|
}
|
||||||
|
//System.out.println("I2PtoTCP: Closed I2P");
|
||||||
try {
|
try {
|
||||||
|
// System.out.println("I2PtoTCP: Close sock");
|
||||||
sock.close();
|
sock.close();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
tell = false;
|
tell = false;
|
||||||
}
|
}
|
||||||
|
// System.out.println("I2PtoTCP: Done");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ import net.i2p.I2PException;
|
|||||||
import net.i2p.client.streaming.I2PSocketManager;
|
import net.i2p.client.streaming.I2PSocketManager;
|
||||||
import net.i2p.client.streaming.I2PSocketManagerFactory;
|
import net.i2p.client.streaming.I2PSocketManagerFactory;
|
||||||
import net.i2p.util.Log;
|
import net.i2p.util.Log;
|
||||||
|
import org.tanukisoftware.wrapper.WrapperManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -64,6 +65,7 @@ public class MUXlisten implements Runnable {
|
|||||||
MUXlisten(NamedDB database, NamedDB info, Log _log) throws I2PException, IOException, RuntimeException {
|
MUXlisten(NamedDB database, NamedDB info, Log _log) throws I2PException, IOException, RuntimeException {
|
||||||
int port = 0;
|
int port = 0;
|
||||||
InetAddress host = null;
|
InetAddress host = null;
|
||||||
|
this.tg = null;
|
||||||
this.database = database;
|
this.database = database;
|
||||||
this.info = info;
|
this.info = info;
|
||||||
this._log = _log;
|
this._log = _log;
|
||||||
@ -207,10 +209,13 @@ die: {
|
|||||||
break die;
|
break die;
|
||||||
}
|
}
|
||||||
} // die
|
} // die
|
||||||
|
|
||||||
// wait for child threads and thread groups to die
|
// wait for child threads and thread groups to die
|
||||||
|
// System.out.println("MUXlisten: waiting for children");
|
||||||
while(tg.activeCount() + tg.activeGroupCount() != 0) {
|
while(tg.activeCount() + tg.activeGroupCount() != 0) {
|
||||||
|
tg.interrupt(); // unwedge any blocking threads.
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000); //sleep for 1000 ms (One second)
|
Thread.sleep(100); //sleep for 100 ms (One tenth second)
|
||||||
} catch(InterruptedException ex) {
|
} catch(InterruptedException ex) {
|
||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
@ -219,11 +224,24 @@ die: {
|
|||||||
// Zap reference to the ThreadGroup so the JVM can GC it.
|
// Zap reference to the ThreadGroup so the JVM can GC it.
|
||||||
tg = null;
|
tg = null;
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
// System.out.println("MUXlisten: Caught an exception" + e);
|
||||||
break quit;
|
break quit;
|
||||||
}
|
}
|
||||||
} // quit
|
} // quit
|
||||||
socketManager.destroySocketManager();
|
// This is here to catch when something fucks up REALLY bad.
|
||||||
|
if(tg != null) {
|
||||||
|
System.out.println("BOB: MUXlisten: Something fucked up REALLY bad!");
|
||||||
|
System.out.println("BOB: MUXlisten: Please email the following dump to sponge@mail.i2p");
|
||||||
|
WrapperManager.requestThreadDump();
|
||||||
|
System.out.println("BOB: MUXlisten: Something fucked up REALLY bad!");
|
||||||
|
System.out.println("BOB: MUXlisten: Please email the avove dump to sponge@mail.i2p");
|
||||||
|
}
|
||||||
// zero out everything, just incase.
|
// zero out everything, just incase.
|
||||||
|
try {
|
||||||
|
socketManager.destroySocketManager();
|
||||||
|
} catch(Exception e) {
|
||||||
|
// nop
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
wlock();
|
wlock();
|
||||||
try {
|
try {
|
||||||
@ -236,7 +254,20 @@ die: {
|
|||||||
}
|
}
|
||||||
wunlock();
|
wunlock();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
return;
|
}
|
||||||
|
// This is here to catch when something fucks up REALLY bad.
|
||||||
|
if(tg != null) {
|
||||||
|
while(tg.activeCount() + tg.activeGroupCount() != 0) {
|
||||||
|
tg.interrupt(); // unwedge any blocking threads.
|
||||||
|
try {
|
||||||
|
Thread.sleep(100); //sleep for 100 ms (One tenth second)
|
||||||
|
} catch(InterruptedException ex) {
|
||||||
|
// nop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tg.destroy();
|
||||||
|
// Zap reference to the ThreadGroup so the JVM can GC it.
|
||||||
|
tg = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
*/
|
*/
|
||||||
package net.i2p.BOB;
|
package net.i2p.BOB;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
@ -91,12 +90,16 @@ public class TCPio implements Runnable {
|
|||||||
* the stream has been reached.
|
* the stream has been reached.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
// System.out.println("TCPio: End Of Stream");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// System.out.println("TCPio: RUNNING = false");
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
// Eject!!! Eject!!!
|
// Eject!!! Eject!!!
|
||||||
|
// System.out.println("TCPio: Caught an exception " + e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// System.out.println("TCPio: Leaving.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,6 @@ public class TCPlistener implements Runnable {
|
|||||||
tgwatch = 2;
|
tgwatch = 2;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// System.out.println("Starting thread count " + Thread.activeCount());
|
|
||||||
Socket server = new Socket();
|
Socket server = new Socket();
|
||||||
listener.setSoTimeout(1000);
|
listener.setSoTimeout(1000);
|
||||||
info.releaseReadLock();
|
info.releaseReadLock();
|
||||||
@ -87,7 +86,6 @@ public class TCPlistener implements Runnable {
|
|||||||
spin = info.get("RUNNING").equals(Boolean.TRUE);
|
spin = info.get("RUNNING").equals(Boolean.TRUE);
|
||||||
info.releaseReadLock();
|
info.releaseReadLock();
|
||||||
database.releaseReadLock();
|
database.releaseReadLock();
|
||||||
// System.out.println("Thread count " + Thread.activeCount());
|
|
||||||
try {
|
try {
|
||||||
server = listener.accept();
|
server = listener.accept();
|
||||||
g = true;
|
g = true;
|
||||||
@ -102,8 +100,13 @@ public class TCPlistener implements Runnable {
|
|||||||
g = false;
|
g = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//System.out.println("TCPlistener: destroySession");
|
||||||
listener.close();
|
listener.close();
|
||||||
} catch(IOException ioe) {
|
} catch(IOException ioe) {
|
||||||
|
try {
|
||||||
|
listener.close();
|
||||||
|
} catch(IOException e) {
|
||||||
|
}
|
||||||
// Fatal failure, cause a stop event
|
// Fatal failure, cause a stop event
|
||||||
database.getReadLock();
|
database.getReadLock();
|
||||||
info.getReadLock();
|
info.getReadLock();
|
||||||
@ -120,17 +123,6 @@ public class TCPlistener implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//System.out.println("STOP!");
|
|
||||||
|
|
||||||
while(Thread.activeCount() > tgwatch) { // wait for all threads in our threadgroup to finish
|
|
||||||
// System.out.println("STOP Thread count " + Thread.activeCount());
|
|
||||||
try {
|
|
||||||
Thread.sleep(1000); //sleep for 1000 ms (One second)
|
|
||||||
} catch(Exception e) {
|
|
||||||
// nop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// System.out.println("STOP Thread count " + Thread.activeCount());
|
|
||||||
// need to kill off the socket manager too.
|
// need to kill off the socket manager too.
|
||||||
I2PSession session = socketManager.getSession();
|
I2PSession session = socketManager.getSession();
|
||||||
if(session != null) {
|
if(session != null) {
|
||||||
@ -139,8 +131,16 @@ public class TCPlistener implements Runnable {
|
|||||||
} catch(I2PSessionException ex) {
|
} catch(I2PSessionException ex) {
|
||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
// System.out.println("destroySession Thread count " + Thread.activeCount());
|
|
||||||
}
|
}
|
||||||
|
//System.out.println("TCPlistener: Waiting for children");
|
||||||
|
while(Thread.activeCount() > tgwatch) { // wait for all threads in our threadgroup to finish
|
||||||
|
try {
|
||||||
|
Thread.sleep(100); //sleep for 100 ms (One tenth second)
|
||||||
|
} catch(Exception e) {
|
||||||
|
// nop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//System.out.println("TCPlistener: Done.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,7 @@ public class TCPtoI2P implements Runnable {
|
|||||||
// nop
|
// nop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// System.out.println("TCPtoI2P: Going away...");
|
||||||
|
|
||||||
} catch(I2PException e) {
|
} catch(I2PException e) {
|
||||||
Emsg("ERROR " + e.toString(), out);
|
Emsg("ERROR " + e.toString(), out);
|
||||||
@ -169,14 +170,17 @@ public class TCPtoI2P implements Runnable {
|
|||||||
} catch(IOException ioe) {
|
} catch(IOException ioe) {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
// System.out.println("TCPtoI2P: Close I2P");
|
||||||
I2P.close();
|
I2P.close();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// System.out.println("TCPtoI2P: Close sock");
|
||||||
sock.close();
|
sock.close();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
}
|
}
|
||||||
}
|
// System.out.println("TCPtoI2P: Done.");
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -121,6 +121,7 @@ public class Connection {
|
|||||||
_resetSentOn = -1;
|
_resetSentOn = -1;
|
||||||
_isInbound = false;
|
_isInbound = false;
|
||||||
_connectionEvent = new ConEvent();
|
_connectionEvent = new ConEvent();
|
||||||
|
_hardDisconnected = false;
|
||||||
_context.statManager().createRateStat("stream.con.windowSizeAtCongestion", "How large was our send window when we send a dup?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
|
_context.statManager().createRateStat("stream.con.windowSizeAtCongestion", "How large was our send window when we send a dup?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
|
||||||
_context.statManager().createRateStat("stream.chokeSizeBegin", "How many messages were outstanding when we started to choke?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
|
_context.statManager().createRateStat("stream.chokeSizeBegin", "How many messages were outstanding when we started to choke?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
|
||||||
_context.statManager().createRateStat("stream.chokeSizeEnd", "How many messages were outstanding when we stopped being choked?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
|
_context.statManager().createRateStat("stream.chokeSizeEnd", "How many messages were outstanding when we stopped being choked?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
|
||||||
@ -148,7 +149,7 @@ public class Connection {
|
|||||||
* @return true if the packet should be sent
|
* @return true if the packet should be sent
|
||||||
*/
|
*/
|
||||||
boolean packetSendChoke(long timeoutMs) {
|
boolean packetSendChoke(long timeoutMs) {
|
||||||
if (false) return true;
|
// if (false) return true; // <--- what the fuck??
|
||||||
long start = _context.clock().now();
|
long start = _context.clock().now();
|
||||||
long writeExpire = start + timeoutMs;
|
long writeExpire = start + timeoutMs;
|
||||||
boolean started = false;
|
boolean started = false;
|
||||||
@ -162,9 +163,9 @@ public class Connection {
|
|||||||
|
|
||||||
// no need to wait until the other side has ACKed us before sending the first few wsize
|
// no need to wait until the other side has ACKed us before sending the first few wsize
|
||||||
// packets through
|
// packets through
|
||||||
// if (!_connected)
|
// Incorrect assumption, the constructor defaults _connected to true --Sponge
|
||||||
// return false;
|
if (!_connected)
|
||||||
|
return false;
|
||||||
started = true;
|
started = true;
|
||||||
if ( (_outboundPackets.size() >= _options.getWindowSize()) || (_activeResends > 0) ||
|
if ( (_outboundPackets.size() >= _options.getWindowSize()) || (_activeResends > 0) ||
|
||||||
(_lastSendId - _highestAckedThrough > _options.getWindowSize()) ) {
|
(_lastSendId - _highestAckedThrough > _options.getWindowSize()) ) {
|
||||||
@ -180,12 +181,12 @@ public class Connection {
|
|||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _options.getWindowSize() + "/"
|
_log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _options.getWindowSize() + "/"
|
||||||
+ _activeResends + "), waiting " + timeLeft);
|
+ _activeResends + "), waiting " + timeLeft);
|
||||||
try { _outboundPackets.wait(timeLeft); } catch (InterruptedException ie) {}
|
try { _outboundPackets.wait(Math.min(timeLeft,250l)); } catch (InterruptedException ie) {}
|
||||||
} else {
|
} else {
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _activeResends
|
_log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _activeResends
|
||||||
+ "), waiting indefinitely");
|
+ "), waiting indefinitely");
|
||||||
try { _outboundPackets.wait(10*1000); } catch (InterruptedException ie) {}
|
try { _outboundPackets.wait(250); } catch (InterruptedException ie) {} //10*1000
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_context.statManager().addRateData("stream.chokeSizeEnd", _outboundPackets.size(), _context.clock().now() - start);
|
_context.statManager().addRateData("stream.chokeSizeEnd", _outboundPackets.size(), _context.clock().now() - start);
|
||||||
@ -487,7 +488,6 @@ public class Connection {
|
|||||||
synchronized (_connectLock) { _connectLock.notifyAll(); }
|
synchronized (_connectLock) { _connectLock.notifyAll(); }
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("Disconnecting " + toString(), new Exception("discon"));
|
_log.debug("Disconnecting " + toString(), new Exception("discon"));
|
||||||
|
|
||||||
if (!cleanDisconnect) {
|
if (!cleanDisconnect) {
|
||||||
_hardDisconnected = true;
|
_hardDisconnected = true;
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
|
@ -97,6 +97,7 @@ public class MessageOutputStream extends OutputStream {
|
|||||||
long begin = _context.clock().now();
|
long begin = _context.clock().now();
|
||||||
while (remaining > 0) {
|
while (remaining > 0) {
|
||||||
WriteStatus ws = null;
|
WriteStatus ws = null;
|
||||||
|
if (_closed) throw new IOException("closed underneath us");
|
||||||
// we do any waiting outside the synchronized() block because we
|
// we do any waiting outside the synchronized() block because we
|
||||||
// want to allow other threads to flushAvailable() whenever they want.
|
// want to allow other threads to flushAvailable() whenever they want.
|
||||||
// this is the only method that *adds* to the _buf, and all
|
// this is the only method that *adds* to the _buf, and all
|
||||||
|
27
history.txt
27
history.txt
@ -1,3 +1,30 @@
|
|||||||
|
2008-12-08 zzz
|
||||||
|
* ATalk: Move from core to apps
|
||||||
|
* Blocklists: enable by default, include blocklist file
|
||||||
|
in new installs
|
||||||
|
* Build: Add findbugs target
|
||||||
|
* Cleanup of removed netdb stats
|
||||||
|
* Console:
|
||||||
|
- Don't display restart button if no wrapper
|
||||||
|
- Remove PRNG stats
|
||||||
|
* Eepsite: Disable jetty webapps by default for new installs
|
||||||
|
* i2psnark:
|
||||||
|
- Add default i2psnark.config for new installs
|
||||||
|
- Remove wishlist link
|
||||||
|
- Recognize robert and i2psnarkxl clients
|
||||||
|
- Increase max files to 256
|
||||||
|
* Increase standalone heap size to 128MB
|
||||||
|
* NetDb: Split classes into their own files for mkvore
|
||||||
|
* PeerManager: Fix NPE on early shutdown
|
||||||
|
* SusiDNS: Add textareas
|
||||||
|
* Transport:
|
||||||
|
- Fixes, avoid NPEs, and cleanups when NTCP and/or UDP transports disabled
|
||||||
|
- More TCP removal cleanup
|
||||||
|
- Clean up bandwidth limiting, centralize defaults
|
||||||
|
- Force burst to be >= limit
|
||||||
|
- Increase default bw to 48/24, burst 64/32
|
||||||
|
* Tunnels: Avoid two NPEs on corrupt fragments
|
||||||
|
|
||||||
2008-12-01 zzz
|
2008-12-01 zzz
|
||||||
* i2psnark:
|
* i2psnark:
|
||||||
- Refactor to allow running a single Snark without a SnarkManager again,
|
- Refactor to allow running a single Snark without a SnarkManager again,
|
||||||
|
@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
|
|||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.548 $ $Date: 2008-06-07 23:00:00 $";
|
public final static String ID = "$Revision: 1.548 $ $Date: 2008-06-07 23:00:00 $";
|
||||||
public final static String VERSION = "0.6.5";
|
public final static String VERSION = "0.6.5";
|
||||||
public final static long BUILD = 1;
|
public final static long BUILD = 4;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
Reference in New Issue
Block a user