Remove sendLegacyCertificateRequest
Summary: Legacy certificate request is most likely deadcode by now. Remove it. Changelog: Remove legacy certificate request Reviewed By: antonk52 Differential Revision: D33707396 fbshipit-source-id: 47a410204bcd2ed843b716461df105ebc48264a6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
43c3bd0edd
commit
76a9b3d3ae
@@ -413,16 +413,12 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() {
|
|||||||
return;
|
return;
|
||||||
certificateExchangeCompleted_ = true;
|
certificateExchangeCompleted_ = true;
|
||||||
if (isError) {
|
if (isError) {
|
||||||
if (response.compare("not implemented")) {
|
auto error =
|
||||||
auto error =
|
"Desktop failed to provide certificates. Error from flipper desktop:\n" +
|
||||||
"Desktop failed to provide certificates. Error from flipper desktop:\n" +
|
response;
|
||||||
response;
|
log(error);
|
||||||
log(error);
|
gettingCert->fail(error);
|
||||||
gettingCert->fail(error);
|
client_ = nullptr;
|
||||||
client_ = nullptr;
|
|
||||||
} else {
|
|
||||||
sendLegacyCertificateRequest(message);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!response.empty()) {
|
if (!response.empty()) {
|
||||||
@@ -468,21 +464,6 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() {
|
|||||||
failedConnectionAttempts_ = 0;
|
failedConnectionAttempts_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlipperConnectionManagerImpl::sendLegacyCertificateRequest(
|
|
||||||
folly::dynamic message) {
|
|
||||||
// Desktop is using an old version of Flipper.
|
|
||||||
// Fall back to fireAndForget, instead of requestResponse.
|
|
||||||
auto sendingRequest =
|
|
||||||
flipperState_->start("Sending fallback certificate request");
|
|
||||||
|
|
||||||
client_->send(message, [this, sendingRequest]() {
|
|
||||||
sendingRequest->complete();
|
|
||||||
folly::dynamic config = folly::dynamic::object();
|
|
||||||
contextStore_->storeConnectionConfig(config);
|
|
||||||
client_ = nullptr;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check for the maximum number of failed socket connection attempts.
|
Check for the maximum number of failed socket connection attempts.
|
||||||
If exceeded, then swap the default socket provider. If the maximum
|
If exceeded, then swap the default socket provider. If the maximum
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ class FlipperConnectionManagerImpl : public FlipperConnectionManager {
|
|||||||
bool isCertificateExchangeNeeded();
|
bool isCertificateExchangeNeeded();
|
||||||
void requestSignedCertFromFlipper();
|
void requestSignedCertFromFlipper();
|
||||||
bool isRunningInOwnThread();
|
bool isRunningInOwnThread();
|
||||||
void sendLegacyCertificateRequest(folly::dynamic message);
|
|
||||||
void reevaluateSocketProvider();
|
void reevaluateSocketProvider();
|
||||||
std::string getDeviceId();
|
std::string getDeviceId();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user