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
This commit is contained in:
Andrey Goncharov
2022-01-31 08:55:17 -08:00
committed by Facebook GitHub Bot
parent ccae37aa71
commit a474a0c2f2

View File

@@ -79,6 +79,7 @@ class ConnectionEvents {
impl->connectionIsTrusted_ = false;
impl->callbacks_->onDisconnected();
}
impl->reevaluateSocketProvider();
impl->reconnect();
break;
}