diff options
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index bc26f62e..384e332b 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -1091,10 +1091,6 @@ PJ_DEF(pj_status_t) pjsua_destroy(void) pjsua_var.acc[i].pool = NULL; } } - - /* Wait for some time to allow unregistration to complete: */ - PJ_LOG(4,(THIS_FILE, "Shutting down...")); - busy_sleep(1000); } /* Destroy media */ @@ -1102,6 +1098,12 @@ PJ_DEF(pj_status_t) pjsua_destroy(void) /* Destroy endpoint. */ if (pjsua_var.endpt) { + /* Wait for some time to allow unregistration and ICE/TURN + * transports shutdown to complete: + */ + PJ_LOG(4,(THIS_FILE, "Shutting down...")); + busy_sleep(1000); + pjsip_endpt_destroy(pjsua_var.endpt); pjsua_var.endpt = NULL; } |