rtmp_notify_call_state(session);
rtmp_send_onhangup(session);
- switch_mutex_lock(tech_pvt->rtmp_session->count_mutex);
- tech_pvt->rtmp_session->active_sessions--;
- switch_mutex_unlock(tech_pvt->rtmp_session->count_mutex);
-
switch_core_hash_delete_wrlock(tech_pvt->rtmp_session->session_hash, switch_core_session_get_uuid(session), tech_pvt->rtmp_session->session_rwlock);
switch_mutex_lock(tech_pvt->rtmp_session->profile->mutex);
}
switch_mutex_unlock(tech_pvt->rtmp_session->profile->mutex);
+ switch_mutex_lock(tech_pvt->rtmp_session->count_mutex);
+ tech_pvt->rtmp_session->active_sessions--;
+ switch_mutex_unlock(tech_pvt->rtmp_session->count_mutex);
+
#ifndef RTMP_DONT_HOLD
if (switch_channel_test_flag(channel, CF_HOLD)) {
switch_channel_mark_hold(channel, SWITCH_FALSE);