forked from I2P_Developers/i2p.i2p
* 2005-12-22 0.6.1.8 released
2005-12-22 jrandom * Bundle the standalone I2PSnark launcher in the installer and update process (launch as "java -jar launch-i2psnark.jar", viewing the interface on http://localhost:8002/) * Don't autostart swarming torrents by default so that you can run a standalone I2PSnark from the I2P install dir and not have the embedded I2PSnark autolaunch the torrents that the standalone instance is running * Fixed a rare streaming lib bug that could let a blocking call wait forever.
This commit is contained in:
@@ -89,6 +89,8 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
|
||||
setInboundBufferSize(opts.getInboundBufferSize());
|
||||
setCongestionAvoidanceGrowthRateFactor(opts.getCongestionAvoidanceGrowthRateFactor());
|
||||
setSlowStartGrowthRateFactor(opts.getSlowStartGrowthRateFactor());
|
||||
setWriteTimeout(opts.getWriteTimeout());
|
||||
setReadTimeout(opts.getReadTimeout());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -256,8 +256,12 @@ public class MessageOutputStream extends OutputStream {
|
||||
long begin = _context.clock().now();
|
||||
WriteStatus ws = null;
|
||||
synchronized (_dataLock) {
|
||||
if (_buf == null) throw new IOException("closed (buffer went away)");
|
||||
if (_buf == null) {
|
||||
_dataLock.notifyAll();
|
||||
throw new IOException("closed (buffer went away)");
|
||||
}
|
||||
if (_dataReceiver == null) {
|
||||
_dataLock.notifyAll();
|
||||
throwAnyError();
|
||||
return;
|
||||
}
|
||||
@@ -293,7 +297,10 @@ public class MessageOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
if (_closed) return;
|
||||
if (_closed) {
|
||||
synchronized (_dataLock) { _dataLock.notifyAll(); }
|
||||
return;
|
||||
}
|
||||
_closed = true;
|
||||
flush();
|
||||
_log.debug("Output stream closed after writing " + _written);
|
||||
@@ -305,6 +312,7 @@ public class MessageOutputStream extends OutputStream {
|
||||
_valid = 0;
|
||||
locked_updateBufferSize();
|
||||
}
|
||||
_dataLock.notifyAll();
|
||||
}
|
||||
if (ba != null) {
|
||||
_dataCache.release(ba);
|
||||
|
Reference in New Issue
Block a user