From: William King Date: Thu, 31 Jan 2013 01:16:41 +0000 (-0800) Subject: fixed stuck mod_rtmp session when the call is killed from fs side, such as using... X-Git-Tag: v1.2.9~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=538c1afa69540c033b77eecee50fe2f7ac5b3f22;p=thirdparty%2Ffreeswitch.git fixed stuck mod_rtmp session when the call is killed from fs side, such as using uuid_kill --- diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index 9f36a41745..24603ba806 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -233,6 +233,10 @@ switch_status_t rtmp_on_destroy(switch_core_session_t *session) switch_buffer_destroy(&tech_pvt->readbuf); switch_core_timer_destroy(&tech_pvt->timer); + + if (tech_pvt->rtmp_session->state != RS_DESTROY) { + rtmp_session_destroy(&tech_pvt->rtmp_session); + } } return SWITCH_STATUS_SUCCESS;