]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
destroy erlang session elements when the outbound erlang processis stopped/terminated
authorJyotshna Cherukuri <jyotshna@voalte.com>
Wed, 11 Feb 2015 20:20:32 +0000 (15:20 -0500)
committerJyotshna Cherukuri <jyotshna@voalte.com>
Wed, 11 Feb 2015 20:20:32 +0000 (15:20 -0500)
src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c

index b1743eb7160d59f6c91d2a6274e2fea036662ce7..0220964607fcde3db1a19c780f255633ba457418 100644 (file)
@@ -1508,6 +1508,9 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
 
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Timed out when waiting for outbound pid %s %s\n", hash, session_element->uuid_str);
                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+               /* Destroy erlang session elements when the outbound erlang process gets killed for some unknown reason */
+        remove_session_elem_from_listener(listener, session_element);
+        destroy_session_elem(session_element);
                return NULL;
        }