From 57752533a6f602475ef85b6ea953e929d26304d2 Mon Sep 17 00:00:00 2001 From: John Knox Date: Wed, 24 Oct 2018 10:28:21 -0700 Subject: [PATCH] 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 --- xplat/Flipper/FlipperConnectionManagerImpl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xplat/Flipper/FlipperConnectionManagerImpl.cpp b/xplat/Flipper/FlipperConnectionManagerImpl.cpp index d3a27682a..a4b29fedc 100644 --- a/xplat/Flipper/FlipperConnectionManagerImpl.cpp +++ b/xplat/Flipper/FlipperConnectionManagerImpl.cpp @@ -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); }