Skip to content

Commit

Permalink
Timeout dtls handshake
Browse files Browse the repository at this point in the history
Temporary fix until webrtc-rs#614 is solved.
  • Loading branch information
FilipJergleAlmquist committed Jan 16, 2025
1 parent 8a07400 commit 0e0e203
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dtls/src/conn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ impl DTLSConn {
});

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

trace!("Handshake Completed");

Expand Down

0 comments on commit 0e0e203

Please sign in to comment.