mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Separate and kotlinize websockets.
This commit is contained in:
committed by
Michelle Tang
parent
6c9acf4657
commit
93d18c1763
@@ -37,12 +37,12 @@ public final class SignalProxyUtil {
|
||||
private SignalProxyUtil() {}
|
||||
|
||||
public static void startListeningToWebsocket() {
|
||||
if (SignalStore.proxy().isProxyEnabled() && AppDependencies.getSignalWebSocket().getWebSocketState().firstOrError().blockingGet().isFailure()) {
|
||||
if (SignalStore.proxy().isProxyEnabled() && AppDependencies.getAuthWebSocket().getState().firstOrError().blockingGet().isFailure()) {
|
||||
Log.w(TAG, "Proxy is in a failed state. Restarting.");
|
||||
AppDependencies.resetNetwork();
|
||||
}
|
||||
|
||||
AppDependencies.getIncomingMessageObserver();
|
||||
AppDependencies.startNetwork();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,8 +88,8 @@ public final class SignalProxyUtil {
|
||||
return testWebsocketConnectionUnregistered(timeout);
|
||||
}
|
||||
|
||||
return AppDependencies.getSignalWebSocket()
|
||||
.getWebSocketState()
|
||||
return AppDependencies.getAuthWebSocket()
|
||||
.getState()
|
||||
.subscribeOn(Schedulers.trampoline())
|
||||
.observeOn(Schedulers.trampoline())
|
||||
.timeout(timeout, TimeUnit.MILLISECONDS)
|
||||
|
||||
Reference in New Issue
Block a user