Skip to content

Commit f03e341

Browse files
Timeout dtls handshake
Temporary fix until webrtc-rs#614 is solved.
1 parent b0630f4 commit f03e341

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dtls/src/conn/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ impl DTLSConn {
409409
});
410410

411411
// Do handshake
412-
c.handshake(initial_fsm_state).await?;
412+
// Temporary fix until https://github.com/webrtc-rs/webrtc/issues/614 is solved
413+
tokio::time::timeout(Duration::from_secs(3), c.handshake(initial_fsm_state))
414+
.await
415+
.map_err(|_| Error::ErrConnClosed)??;
413416

414417
trace!("Handshake Completed");
415418

0 commit comments

Comments
 (0)