From a474a0c2f2b0afb25dba838e7d2f077b10a7c5e5 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Mon, 31 Jan 2022 08:55:17 -0800 Subject: [PATCH] Fallback to RSockets if cert exchange fails Summary: Changelog: Fallback to RSockets if cert exchange fails even if the connection was successful. Currently, we fallback to RSockets only if the connected is rejected. It turns out that WS server does not reject connection from our RSocket client. Instead, it rejects the messages. As result, requestSignedCertFromFlipper fails, but it never triggers the change of protocol. With this diff we start evaluating if we need to change our protocol for every socket error. Reviewed By: lblasa Differential Revision: D33890235 fbshipit-source-id: f79b5c6992f01f8a93e0793e180a5cbd4a105619 --- xplat/Flipper/FlipperConnectionManagerImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xplat/Flipper/FlipperConnectionManagerImpl.cpp b/xplat/Flipper/FlipperConnectionManagerImpl.cpp index 3ae4ff753..f5aa2f5c4 100644 --- a/xplat/Flipper/FlipperConnectionManagerImpl.cpp +++ b/xplat/Flipper/FlipperConnectionManagerImpl.cpp @@ -79,6 +79,7 @@ class ConnectionEvents { impl->connectionIsTrusted_ = false; impl->callbacks_->onDisconnected(); } + impl->reevaluateSocketProvider(); impl->reconnect(); break; }