[mod_event_socket] Fix "Listener session is null" problem - regression from previous commit to the mod.
This commit is contained in:
parent
b0f09fcff2
commit
f8dc87bd18
|
@ -2635,16 +2635,12 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||
|
||||
switch_assert(listener != NULL);
|
||||
|
||||
if (!(session = listener->session)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Listener session is null!\n");
|
||||
switch_clear_flag_locked(listener, LFLAG_RUNNING);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Unable to lock session!\n");
|
||||
locked = 0;
|
||||
goto done;
|
||||
if ((session = listener->session)) {
|
||||
if (switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Unable to lock session!\n");
|
||||
locked = 0;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (!listener->sock) {
|
||||
|
|
Loading…
Reference in New Issue