Poll less frequently when own hidden service is stable.

This commit is contained in:
akwizgran
2022-04-16 13:33:48 +01:00
parent 7cd3c2890b
commit 3038b92dbc
18 changed files with 237 additions and 41 deletions

View File

@@ -69,8 +69,8 @@ public class JavaBluetoothPluginFactory implements DuplexPluginFactory {
BluetoothConnectionFactory<StreamConnection> connectionFactory =
new JavaBluetoothConnectionFactory(connectionLimiter,
timeoutMonitor);
Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL,
MAX_POLLING_INTERVAL, BACKOFF_BASE);
Backoff backoff = backoffFactory.createBackoff(eventBus, ID,
MIN_POLLING_INTERVAL, MAX_POLLING_INTERVAL, BACKOFF_BASE);
JavaBluetoothPlugin plugin = new JavaBluetoothPlugin(connectionLimiter,
connectionFactory, ioExecutor, wakefulIoExecutor, secureRandom,
backoff, callback, MAX_LATENCY, MAX_IDLE_TIME);

View File

@@ -43,6 +43,10 @@ public class TestPluginCallback implements PluginCallback {
public void pluginStateChanged(State state) {
}
@Override
public void pollingIntervalDecreased() {
}
@Override
public void handleConnection(DuplexTransportConnection c) {
}