]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[mod_event_socket] Check if listener is running before pushing more logs or events...
authorAnton Olofsson <olofssonanton93@gmail.com>
Mon, 29 Jan 2024 16:05:45 +0000 (17:05 +0100)
committerGitHub <noreply@github.com>
Mon, 29 Jan 2024 16:05:45 +0000 (19:05 +0300)
commit9df3076f29a52a690ebd25b1972a8b97d55442e0
tree08c64e9f5c25ae9e2823b29895b310c7f478f176
parent8e36c59033e88451b4d78a1d1f03df0a9ae28cd2
[mod_event_socket] Check if listener is running before pushing more logs or events to its queue

This fixes a possibility for MAX_MISSED to be exceeded if more logs are
attempted to be pushed to the listener's queue after running kill_listener but
before the listener thread gets CPU time and removes itself.

On a heavily loaded system with a lot of logs in the event dispatch queue
these excessive logs may prove fatal since socket_logger itself will produce
logs about the full queue, resulting in a circular situation of never-ending logs.

The same logic was applied to event_handler after finding the same behaviour
mentioned in signalwire/freeswitch#2143.
src/mod/event_handlers/mod_event_socket/mod_event_socket.c