Reconnect after desktop fails during cert exchange

Summary:
The code here is quite complicated so here's whats happening:

There's a disconnect hook, that waits and reconnects, so flipper never stops, except for the case where the desktop itself fails.

This makes some sense, but not total sense, as the client should really keep connecting, in case there's a different desktop that won't fail, or even if it was a transient failure.

Explicitly disconnecting, by setting the client to null, will trigger the disconnect hook and carry on the connect loop.

Reviewed By: passy

Differential Revision: D10231241

fbshipit-source-id: 90d823dce2221b1fb6501bd2797871dc1fb9770a
This commit is contained in:
John Knox
2018-10-24 10:28:21 -07:00
committed by Facebook Github Bot
parent d1a1c299dc
commit 57752533a6

View File

@@ -270,6 +270,7 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() {
if (errorMessage.compare("not implemented")) {
log("Desktop failed to provide certificates. Error from flipper desktop:\n" + errorMessage);
client_ = nullptr;
} else {
sendLegacyCertificateRequest(message);
}