2009-04-10 sponge
* More BOB threadgroup fixes, plus debug dump when things go wrong. * Fixes to streaminglib, I2CP, which are related to the TG problem. * JavaDocs fixups.
This commit is contained in:
@ -187,12 +187,12 @@ public class Connection {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _options.getWindowSize() + "/"
|
||||
+ _activeResends + "), waiting " + timeLeft);
|
||||
try { _outboundPackets.wait(Math.min(timeLeft,250l)); } catch (InterruptedException ie) {}
|
||||
try { _outboundPackets.wait(Math.min(timeLeft,250l)); } catch (InterruptedException ie) { if (_log.shouldLog(Log.DEBUG)) _log.debug("InterruptedException while Outbound window is full (" + _outboundPackets.size() + "/" + _activeResends +")"); return false;}
|
||||
} else {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Outbound window is full (" + _outboundPackets.size() + "/" + _activeResends
|
||||
+ "), waiting indefinitely");
|
||||
try { _outboundPackets.wait(250); } catch (InterruptedException ie) {} //10*1000
|
||||
try { _outboundPackets.wait(250); } catch (InterruptedException ie) {if (_log.shouldLog(Log.DEBUG)) _log.debug("InterruptedException while Outbound window is full (" + _outboundPackets.size() + "/" + _activeResends + ")"); return false;} //10*1000
|
||||
}
|
||||
} else {
|
||||
_context.statManager().addRateData("stream.chokeSizeEnd", _outboundPackets.size(), _context.clock().now() - start);
|
||||
@ -810,7 +810,11 @@ public class Connection {
|
||||
synchronized (_connectLock) {
|
||||
_connectLock.wait(timeLeft);
|
||||
}
|
||||
} catch (InterruptedException ie) {}
|
||||
} catch (InterruptedException ie) {
|
||||
if (_log.shouldLog(Log.DEBUG)) _log.debug("waitForConnect(): InterruptedException");
|
||||
_connectionError = "InterruptedException";
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ class ConnectionHandler {
|
||||
if (timeoutMs <= 0) {
|
||||
try {
|
||||
syn = _synQueue.take(); // waits forever
|
||||
} catch (InterruptedException ie) {}
|
||||
} catch (InterruptedException ie) { break;}
|
||||
} else {
|
||||
long remaining = expiration - _context.clock().now();
|
||||
// (dont think this applies anymore for LinkedBlockingQueue)
|
||||
@ -138,7 +138,7 @@ class ConnectionHandler {
|
||||
break;
|
||||
try {
|
||||
syn = _synQueue.poll(remaining, TimeUnit.MILLISECONDS); // waits the specified time max
|
||||
} catch (InterruptedException ie) {}
|
||||
} catch (InterruptedException ie) { }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public class PacketLocal extends Packet implements MessageOutputStream.WriteStat
|
||||
timeRemaining = 10*1000;
|
||||
wait(timeRemaining);
|
||||
}
|
||||
} catch (InterruptedException ie) {}
|
||||
} catch (InterruptedException ie) { break; }
|
||||
}
|
||||
if (!writeSuccessful())
|
||||
releasePayload();
|
||||
|
Reference in New Issue
Block a user