mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Don't reuse the same ConnectionChooser every time.
This is a fix for a backporting mistake.
This commit is contained in:
@@ -10,6 +10,7 @@ import org.briarproject.bramble.api.plugin.PluginManager;
|
|||||||
|
|
||||||
import javax.annotation.concurrent.Immutable;
|
import javax.annotation.concurrent.Immutable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Provider;
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
@NotNullByDefault
|
@NotNullByDefault
|
||||||
@@ -19,22 +20,22 @@ class KeyAgreementTaskFactoryImpl implements KeyAgreementTaskFactory {
|
|||||||
private final EventBus eventBus;
|
private final EventBus eventBus;
|
||||||
private final PayloadEncoder payloadEncoder;
|
private final PayloadEncoder payloadEncoder;
|
||||||
private final PluginManager pluginManager;
|
private final PluginManager pluginManager;
|
||||||
private final ConnectionChooser connectionChooser;
|
private final Provider<ConnectionChooser> connectionChooserProvider;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
KeyAgreementTaskFactoryImpl(CryptoComponent crypto, EventBus eventBus,
|
KeyAgreementTaskFactoryImpl(CryptoComponent crypto, EventBus eventBus,
|
||||||
PayloadEncoder payloadEncoder, PluginManager pluginManager,
|
PayloadEncoder payloadEncoder, PluginManager pluginManager,
|
||||||
ConnectionChooser connectionChooser) {
|
Provider<ConnectionChooser> connectionChooserProvider) {
|
||||||
this.crypto = crypto;
|
this.crypto = crypto;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.payloadEncoder = payloadEncoder;
|
this.payloadEncoder = payloadEncoder;
|
||||||
this.pluginManager = pluginManager;
|
this.pluginManager = pluginManager;
|
||||||
this.connectionChooser = connectionChooser;
|
this.connectionChooserProvider = connectionChooserProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public KeyAgreementTask createTask() {
|
public KeyAgreementTask createTask() {
|
||||||
return new KeyAgreementTaskImpl(crypto, eventBus, payloadEncoder,
|
return new KeyAgreementTaskImpl(crypto, eventBus, payloadEncoder,
|
||||||
pluginManager, connectionChooser);
|
pluginManager, connectionChooserProvider.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user