Tunnels: static fix, synchronization fix, deprecate setPairedTunnel()
This commit is contained in:
@ -109,7 +109,7 @@ class BuildRequestor {
|
||||
return;
|
||||
}
|
||||
|
||||
cfg.setPairedTunnel(pairedTunnel);
|
||||
//cfg.setPairedTunnel(pairedTunnel);
|
||||
|
||||
long beforeDispatch = System.currentTimeMillis();
|
||||
if (cfg.isInbound()) {
|
||||
|
@ -83,7 +83,9 @@ public class PooledTunnelCreatorConfig extends TunnelCreatorConfig {
|
||||
public void setTestJob(TestJob job) { _testJob = job; }
|
||||
public void setExpireJob(Job job) { /* _expireJob = job; */ }
|
||||
|
||||
// Fix memory leaks caused by references if you need to use pairedTunnel
|
||||
/**
|
||||
* @deprecated Fix memory leaks caused by references if you need to use pairedTunnel
|
||||
*/
|
||||
public void setPairedTunnel(TunnelInfo tunnel) { /* _pairedTunnel = tunnel; */}
|
||||
// public TunnelInfo getPairedTunnel() { return _pairedTunnel; }
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ public abstract class TunnelPeerSelector {
|
||||
* Now:
|
||||
* d((H(l+h), h) - d(H(r+h), h)
|
||||
*/
|
||||
private class HashComparator implements Comparator {
|
||||
private static class HashComparator implements Comparator {
|
||||
private Hash _hash;
|
||||
|
||||
private HashComparator(Hash h) {
|
||||
|
@ -175,7 +175,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
public int getOutboundClientTunnelCount() {
|
||||
int count = 0;
|
||||
List destinations = null;
|
||||
synchronized (_clientInboundPools) {
|
||||
synchronized (_clientOutboundPools) {
|
||||
destinations = new ArrayList(_clientOutboundPools.keySet());
|
||||
}
|
||||
for (int i = 0; i < destinations.size(); i++) {
|
||||
|
Reference in New Issue
Block a user