Remove dial connection timeout

This commit is contained in:
Franck Royer 2021-01-22 19:46:45 +11:00
parent 741f97efff
commit 5abb1ce20a
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4

View file

@ -38,13 +38,10 @@ pub async fn negotiate(
) -> Result<(ResponseChannel<AliceToBob>, alice::State3)> { ) -> Result<(ResponseChannel<AliceToBob>, alice::State3)> {
trace!("Starting negotiate"); trace!("Starting negotiate");
// todo: we can move this out, we dont need to timeout here let _peer_id = event_loop_handle
let _peer_id = timeout( .recv_conn_established()
config.bob_time_to_act,
event_loop_handle.recv_conn_established(),
)
.await .await
.context("Failed to receive dial connection from Bob")??; .context("Failed to receive dial connection from Bob")?;
let event = timeout(config.bob_time_to_act, event_loop_handle.recv_request()) let event = timeout(config.bob_time_to_act, event_loop_handle.recv_request())
.await .await