Move reset state to a more appropriate location

Summary: Not really part of the connect process in this case, so is getting moved closer to where the CSR is generated.

Reviewed By: passy

Differential Revision: D46849966

fbshipit-source-id: b91e2925552cd7fcab67b3d1d7af006f4f8c1431
This commit is contained in:
Lorenzo Blasa
2023-06-21 23:16:34 -07:00
committed by Facebook GitHub Bot
parent 3f6424930a
commit 1b5c9e627a

View File

@@ -225,11 +225,8 @@ bool FlipperConnectionManagerImpl::connectAndExchangeCertificate() {
connectingInsecurely->complete(); connectingInsecurely->complete();
auto resettingState = flipperState_->start("Reset state");
contextStore_->resetState();
resettingState->complete();
requestSignedCertificate(); requestSignedCertificate();
return true; return true;
} }
@@ -464,6 +461,10 @@ void FlipperConnectionManagerImpl::processSignedCertificateResponse(
} }
void FlipperConnectionManagerImpl::requestSignedCertificate() { void FlipperConnectionManagerImpl::requestSignedCertificate() {
auto resettingState = flipperState_->start("Reset connection store state");
contextStore_->resetState();
resettingState->complete();
auto generatingCSR = flipperState_->start("Generate CSR"); auto generatingCSR = flipperState_->start("Generate CSR");
std::string csr = contextStore_->getCertificateSigningRequest(); std::string csr = contextStore_->getCertificateSigningRequest();
generatingCSR->complete(); generatingCSR->complete();