diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-07-14 09:32:14 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-07-14 09:32:14 +0000 |
commit | 6205d4c9b865b1717b1b144694438d4dabc3fdc2 (patch) | |
tree | f475aac89c83051ca93a0809af5ac037d89010ad /pjsip/src/pjsua-lib | |
parent | a9ea36c5c27cbda257c91bcbad72f1c9a3d34739 (diff) |
Ticket #566: TURN session in PJSUA-LIB is not properly destroyed causing possible memory and handle leaks
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2133 74dad513-b988-da41-8d7b-12977e46ad98
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; } |