New polling logic for Tor. #250

Poll for outgoing connections each time the network is enabled, then disable polling once our hidden service descriptor has been published.
This commit is contained in:
akwizgran
2016-02-12 14:13:50 +00:00
parent fee4beae63
commit 066285b86a
2 changed files with 19 additions and 2 deletions

View File

@@ -176,6 +176,7 @@ abstract class TcpPlugin implements DuplexPlugin {
public void poll(Collection<ContactId> connected) {
if (!isRunning()) return;
backoff.increment();
// TODO: Pass properties to connectAndCallBack()
for (ContactId c : callback.getRemoteProperties().keySet())
if (!connected.contains(c)) connectAndCallBack(c);
}