mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-26 22:20:20 +00:00
Use tryOnError in CdsiSocket.
This commit is contained in:
@@ -157,7 +157,7 @@ final class CdsiSocket {
|
||||
} catch (IOException | AttestationDataException | Cds2CommunicationFailureException e) {
|
||||
Log.w(TAG, e);
|
||||
webSocket.close(1000, "OK");
|
||||
emitter.onError(e);
|
||||
emitter.tryOnError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,13 +170,13 @@ final class CdsiSocket {
|
||||
Log.w(TAG, "Remote side is closing with non-normal code " + code);
|
||||
webSocket.close(1000, "Remote closed with code " + code);
|
||||
stage.set(Stage.FAILED);
|
||||
emitter.onError(new NonSuccessfulResponseCodeException(code));
|
||||
emitter.tryOnError(new NonSuccessfulResponseCodeException(code));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(WebSocket webSocket, Throwable t, Response response) {
|
||||
emitter.onError(t);
|
||||
emitter.tryOnError(t);
|
||||
stage.set(Stage.FAILED);
|
||||
webSocket.close(1000, "OK");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user