tor-hsclient: Check RENDEZVOUS_ESTABLISHED *after* it should exist
Bugfix, without which this code wouldn't work. Reported in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1228#note_2910293
This commit is contained in:
parent
180f1dcb47
commit
1fb4c1eb2a
|
@ -678,16 +678,16 @@ impl<'c, R: Runtime, M: MocksForConnect<R>> Context<'c, R, M> {
|
|||
}
|
||||
}
|
||||
|
||||
let _: RendezvousEstablished = reply
|
||||
.try_recv()
|
||||
.map_err(into_internal!("oneshot dropped"))?
|
||||
.ok_or_else(|| internal!("RENDEZVOUS_ESTABLISHED not sent yet"))?;
|
||||
|
||||
rend_circ
|
||||
.send_control_message(message, Handler(Some(reply_tx)))
|
||||
.await
|
||||
.map_err(|error| FAE::RendezvousEstablish { error, rend_pt })?;
|
||||
|
||||
let _: RendezvousEstablished = reply
|
||||
.try_recv()
|
||||
.map_err(into_internal!("oneshot dropped"))?
|
||||
.ok_or_else(|| internal!("RENDEZVOUS_ESTABLISHED not sent yet"))?;
|
||||
|
||||
Ok(Rendezvous {
|
||||
rend_circ,
|
||||
rend_cookie,
|
||||
|
|
Loading…
Reference in New Issue