mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Only fallback to unidentified socket when a auth error occurs.
Fixes #12395
This commit is contained in:
committed by
Greyson Parrelli
parent
c6c30f25a2
commit
f0a109245b
@@ -1775,8 +1775,11 @@ public class SignalServiceMessageSender {
|
|||||||
} catch (WebSocketUnavailableException e) {
|
} catch (WebSocketUnavailableException e) {
|
||||||
Log.i(TAG, "[sendMessage][" + timestamp + "] Unidentified pipe unavailable, falling back... (" + e.getClass().getSimpleName() + ": " + e.getMessage() + ")");
|
Log.i(TAG, "[sendMessage][" + timestamp + "] Unidentified pipe unavailable, falling back... (" + e.getClass().getSimpleName() + ": " + e.getMessage() + ")");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w(TAG, e);
|
Throwable cause = e;
|
||||||
Log.w(TAG, "[sendMessage][" + timestamp + "] Unidentified pipe failed, falling back...");
|
if (e.getCause() != null) {
|
||||||
|
cause = e.getCause();
|
||||||
|
}
|
||||||
|
Log.w(TAG, "[sendMessage][" + timestamp + "] Unidentified pipe failed, falling back... (" + cause.getClass().getSimpleName() + ": " + cause.getMessage() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -207,8 +207,7 @@ public final class SignalWebSocket {
|
|||||||
return request(requestMessage);
|
return request(requestMessage);
|
||||||
}
|
}
|
||||||
return Single.just(r);
|
return Single.just(r);
|
||||||
})
|
});
|
||||||
.onErrorResumeNext(t -> request(requestMessage));
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
return Single.error(e);
|
return Single.error(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user