forked from I2P_Developers/i2p.i2p
Code cleanup in I2PSocketManagerFull and I2PServerSocketFull
BUGFIX ConnectionHandler had a comparason bug that caused it to block when infact it was asked NOT to block
This commit is contained in:
@@ -95,7 +95,11 @@ class ConnectionHandler {
|
||||
try { _synQueue.wait(); } catch (InterruptedException ie) {}
|
||||
} else {
|
||||
long remaining = expiration - _context.clock().now();
|
||||
if (remaining < 0)
|
||||
// BUGFIX
|
||||
// The specified amount of real time has elapsed, more or less.
|
||||
// If timeout is zero, however, then real time is not taken into consideration
|
||||
// and the thread simply waits until notified.
|
||||
if (remaining < 1)
|
||||
break;
|
||||
try { _synQueue.wait(remaining); } catch (InterruptedException ie) {}
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import net.i2p.I2PException;
|
||||
|
||||
/**
|
||||
|
@@ -128,8 +128,8 @@ public class I2PSocketManagerFull implements I2PSocketManager {
|
||||
return sock;
|
||||
} else {
|
||||
if(_connectionManager.MgetSoTimeout() == -1) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
throw new SocketTimeoutException("I2PSocket timed out");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user