Allow using a proxy during registration.

This commit is contained in:
Greyson Parrelli
2021-02-02 19:56:50 -05:00
parent 46344776a4
commit 30563ed3e5
10 changed files with 130 additions and 42 deletions

View File

@@ -47,7 +47,10 @@ public class PipeConnectivityListener implements ConnectivityListener {
@Override
public void onDisconnected() {
Log.w(TAG, "onDisconnected()");
state.postValue(State.DISCONNECTED);
if (state.getValue() != State.FAILURE) {
state.postValue(State.DISCONNECTED);
}
}
@Override
@@ -65,7 +68,7 @@ public class PipeConnectivityListener implements ConnectivityListener {
if (SignalStore.proxy().isProxyEnabled()) {
Log.w(TAG, "Encountered an error while we had a proxy set! Terminating the connection to prevent retry spam.");
ApplicationDependencies.getIncomingMessageObserver().terminate();
ApplicationDependencies.closeConnectionsAfterProxyFailure();
return false;
} else {
return true;