diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 99a6415469..ae64880216 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -271,9 +271,10 @@ static void event_handler(switch_event_t *event) return; } + switch_mutex_lock(globals.listener_mutex); + lp = listen_list.listeners; - switch_mutex_lock(globals.listener_mutex); while (lp) { int send = 0;