tor-proto: Rename create_firsthop() to wait_for_create().

This commit is contained in:
Gabriela Moldovan 2023-07-27 10:56:18 +01:00
parent 6f22c16ecc
commit ecfec3b827
No known key found for this signature in database
GPG Key ID: 3946E0ADE72BAC99
1 changed files with 2 additions and 2 deletions

View File

@ -601,7 +601,7 @@ impl Reactor {
/// processes one cell or control message.
async fn run_once(&mut self) -> std::result::Result<(), ReactorError> {
if self.hops.is_empty() {
self.create_firsthop().await?;
self.wait_for_create().await?;
return Ok(());
}
@ -757,7 +757,7 @@ impl Reactor {
/// Wait for a [`CtrlMsg::Create`] to come along to set up the circuit.
///
/// Returns an error if an unexpected `CtrlMsg` is received.
async fn create_firsthop(&mut self) -> std::result::Result<(), ReactorError> {
async fn wait_for_create(&mut self) -> std::result::Result<(), ReactorError> {
let Some(msg) = self.control.next().await else {
trace!("{}: reactor shutdown due to control drop", self.unique_id);
return Err(ReactorError::Shutdown);