[Freeswitch-users] mod_event_socket 'linger timeout, closing socket'

Alejandro Recarey ar at cyberfonica.com
Wed May 31 16:28:45 UTC 2017


Hi all, thanks for taking the time to read,

I'm using an outbound socket server (plivo open source) to control my FS
calls. The problem I'm having is that when using the 'record' command
sometimes the outbound socket app is not receiving the events that signal
the end of the recording. This is a somewhat random event. Sometimes it
works perfectly, and sometimes it doesnt.

In the cases where it doesnt work, I get the following message in the FS
console:

2017-05-30 16:55:53.013021 [DEBUG] mod_event_socket.c:1431 linger timeout,
closing socket

I added a little bit of extra logging to mod_event_socket.c and recompiled
and I got this info:

2017-05-31 12:46:47.009854 [DEBUG] mod_event_socket.c:1431 Extra Debug:
Linger timeout: 1496234806 - Epoch Time Now: 1496234807
2017-05-31 12:46:47.009854 [DEBUG] mod_event_socket.c:1432 linger timeout,
closing socket

I wanted to print those two variables, because they're used in
mod_event_socket in the if that determines whether to throw the timeout
error or not:

if (switch_test_flag(listener, LFLAG_HANDLE_DISCO) &&
listener->linger_timeout != (time_t) -1 && switch_epoch_time_now(NULL) >
listener->linger_timeout) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(listener->session),
SWITCH_LOG_DEBUG, "linger timeout, closing socket\n");
status = SWITCH_STATUS_FALSE;
break;
}

Notice that if the epoch has advanced just 1 second (hence epoch >
linger_timeout) the socket is dropped.

I would hope that the socket would linger for longer than one second. Is
there any way to raise this timeout?


Thanks again,

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170531/790a797e/attachment.html>


More information about the FreeSWITCH-users mailing list