From 5fff501d26982fe40fa96d21a24d8b20d2700e77 Mon Sep 17 00:00:00 2001 From: John Knox Date: Thu, 21 Feb 2019 09:58:10 -0800 Subject: [PATCH] Don't log cert exchange connection failures Summary: This info is still available in the diagnostic screen. Reviewed By: passy Differential Revision: D14164791 fbshipit-source-id: 1fc91da0b7437d530bddee6cbb5ea8c2d11f7b80 --- xplat/Flipper/FlipperConnectionManagerImpl.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xplat/Flipper/FlipperConnectionManagerImpl.cpp b/xplat/Flipper/FlipperConnectionManagerImpl.cpp index 31f7032b7..47a7d4f6a 100644 --- a/xplat/Flipper/FlipperConnectionManagerImpl.cpp +++ b/xplat/Flipper/FlipperConnectionManagerImpl.cpp @@ -301,23 +301,25 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() { // TODO: Connect immediately, without waiting for reconnect client_ = nullptr; }, - [this, message](folly::exception_wrapper e) { + [this, message, gettingCert](folly::exception_wrapper e) { e.handle( [&](rsocket::ErrorWithPayload& errorWithPayload) { std::string errorMessage = errorWithPayload.payload.moveDataToString(); if (errorMessage.compare("not implemented")) { - log("Desktop failed to provide certificates. Error from flipper desktop:\n" + - errorMessage); + auto error = + "Desktop failed to provide certificates. Error from flipper desktop:\n" + + errorMessage; + log(error); + gettingCert->fail(error); client_ = nullptr; } else { sendLegacyCertificateRequest(message); } }, - [e](...) { - log(("Error during certificate exchange:" + e.what()) - .c_str()); + [e, gettingCert](...) { + gettingCert->fail(e.what().c_str()); }); }); });