Summary:
[Step 1 of a protocol change between desktop app and flipper agent]
The flipper agent periodically tries to connect.
When it doesn't have the required certs, instead of trying to connect, it requests them from the desktop.
After requesting, it just continues the loop, trying to request.
The problem with that is
a) the desktop can take longer than one cycle to generate and provide the certs, meaning the agent will make overlapping requests, causing confusion and it to take longer than necessary.
b) the desktop can take less time than a retry cycle, but the agent will still wait before trying to connect.
Fixing a) by making the agent wait for a response from the desktop before continuing attempting to reconnect.
This means on the next connection attempt, it's guaranteed that the desktop is finished processing the CSR.
b) remains unfixed for now, but can be dealt with separately.
This is step 1 which adds an extra responder to the desktop app. It won't change anything until the agent starts
sending requestResponse messages instead of fireAndForgets. The plan is to leave this in place for a while to give users time to update, after that, we'll roll out the change to the agent.
Reviewed By: passy
Differential Revision: D9179392
fbshipit-source-id: 9a8021253dcd28c15cceeec23630a67aec219fd5