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

Alejandro Recarey ar at cyberfonica.com
Wed May 31 16:52:49 UTC 2017


My bad, I just figured out that linger can take arguments. I was sending
some corrupted data (a space and the null character) and FS took it as a 0,
killing the linger on the first epoch change. I set it to -1 to get
unlimited linger.

Quickly fixed and working, thanks again!



On Wed, May 31, 2017 at 6:28 PM, Alejandro Recarey <ar at cyberfonica.com>
wrote:

> 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/642ced1b/attachment.html>


More information about the FreeSWITCH-users mailing list