Enable WebSockets for Android

Summary: This change effectively prioritises WebSocket over RSocket connections for Android.

Reviewed By: passy

Differential Revision: D32490095

fbshipit-source-id: 836438970f0668521ca6e7fab6c106e77f951652
This commit is contained in:
Lorenzo Blasa
2021-12-02 02:23:31 -08:00
committed by Facebook GitHub Bot
parent 3db072557b
commit 6a4a867f74
3 changed files with 2 additions and 11 deletions

View File

@@ -31,9 +31,7 @@ static constexpr int reconnectIntervalSeconds = 2;
// To be bumped for every core platform interface change.
static constexpr int sdkVersion = 4;
#ifdef __APPLE__
static constexpr int maxFailedSocketConnectionAttempts = 3;
#endif
using namespace folly;
@@ -477,7 +475,6 @@ void FlipperConnectionManagerImpl::sendLegacyCertificateRequest(
WebSocket -> RSocket -> WebSocket -> ...
*/
void FlipperConnectionManagerImpl::reevaluateSocketProvider() {
#ifdef __APPLE__
if (failedSocketConnectionAttempts < maxFailedSocketConnectionAttempts) {
++failedSocketConnectionAttempts;
} else {
@@ -490,7 +487,6 @@ void FlipperConnectionManagerImpl::reevaluateSocketProvider() {
FlipperSocketProvider::unshelveDefault();
}
}
#endif
}
bool FlipperConnectionManagerImpl::isRunningInOwnThread() {