Skip to content
Snippets Groups Projects
Unverified Commit 04acab5a authored by Sébastien Blin's avatar Sébastien Blin
Browse files

pjproject: avoid to cancel succesful connection

The timer is triggered through a passive candidate, so it should
be done only if the timer is none.

Change-Id: I89a16467667393949ad38b4184b4edfb0a452675
parent 33358295
No related branches found
No related tags found
No related merge requests found
......@@ -669,7 +669,7 @@ index fff4fad26..e7f8b84eb 100644
if (status != PJ_SUCCESS && status != PJ_EPENDING) {
app_perror(" error: server sending data", status);
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
index 2a4125bc5..526c8e13f 100644
index 2a4125bc5..d2eae9494 100644
--- a/pjnath/src/pjnath/ice_session.c
+++ b/pjnath/src/pjnath/ice_session.c
@@ -18,6 +18,7 @@
......@@ -966,10 +966,10 @@ index 2a4125bc5..526c8e13f 100644
+ case PJ_CAND_TCP_SO:
+ default:
+ if (lcand->type == PJ_ICE_CAND_TYPE_RELAYED) {
+ pj_timer_heap_cancel_if_active(ice->stun_cfg.timer_heap,
+ &ice->timer, TIMER_NONE);
+ status = (*ice->cb.select_turn_dataconn)(ice, clist, check_id);
+ if (ice->timer.id == TIMER_NONE) {
+ pj_timer_heap_cancel_if_active(ice->stun_cfg.timer_heap,
+ &ice->timer, TIMER_NONE);
+ pj_time_val delay = {
+ .sec = 0,
+ .msec = 1500
......@@ -4127,4 +4127,4 @@ index 474a8d07c..9257f07a4 100644
+ sess->af, PJ_STUN_TP_UDP, &stun_sock_cb,
NULL, sess, &sess->stun_sock);
if (status != PJ_SUCCESS) {
char errmsg[PJ_ERR_MSG_SIZE];
\ No newline at end of file
char errmsg[PJ_ERR_MSG_SIZE];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment