Skip to content

Commit

Permalink
Fixed DTLS clock stoppage race (#3905)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Apr 1, 2024
1 parent 51e5206 commit 86b7dd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pjmedia/src/pjmedia/transport_srtp_dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,15 +829,15 @@ static pj_status_t ssl_flush_wbio(dtls_srtp *ds, unsigned idx)
PJ_LOG(2,(ds->base.name, "DTLS-SRTP negotiation for %s completed!",
CHANNEL_TO_STRING(idx)));

DTLS_UNLOCK(ds);

/* Stop the retransmission clock. Note that the clock may not be stopped
* if this function is called from clock thread context. We'll try again
* later in socket context.
*/
if (ds->clock[idx])
pjmedia_clock_stop(ds->clock[idx]);

DTLS_UNLOCK(ds);

/* Get SRTP key material */
status = ssl_get_srtp_material(ds, idx);
if (status != PJ_SUCCESS) {
Expand Down

0 comments on commit 86b7dd4

Please sign in to comment.