Skip to content

Commit

Permalink
Move reset state to a more appropriate location
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lblasa authored and facebook-github-bot committed Jun 22, 2023
1 parent 3f64249 commit 1b5c9e6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xplat/Flipper/FlipperConnectionManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,8 @@ bool FlipperConnectionManagerImpl::connectAndExchangeCertificate() {

connectingInsecurely->complete();

auto resettingState = flipperState_->start("Reset state");
contextStore_->resetState();
resettingState->complete();

requestSignedCertificate();

return true;
}

Expand Down Expand Up @@ -464,6 +461,10 @@ void FlipperConnectionManagerImpl::processSignedCertificateResponse(
}

void FlipperConnectionManagerImpl::requestSignedCertificate() {
auto resettingState = flipperState_->start("Reset connection store state");
contextStore_->resetState();
resettingState->complete();

auto generatingCSR = flipperState_->start("Generate CSR");
std::string csr = contextStore_->getCertificateSigningRequest();
generatingCSR->complete();
Expand Down

0 comments on commit 1b5c9e6

Please sign in to comment.