1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-01-03 14:56:34 -05:00

Update: Let the event stream run once a second even if no new event is there to process clients

This commit is contained in:
Philipp Schafft 2024-01-25 10:41:23 +00:00
parent 11ae1e87df
commit 1c4ce97d6c

View File

@ -183,6 +183,8 @@ void event_stream_add_client_inner(client_t *client, void *ud)
event_stream_thread = thread_create("Event Stream Thread", event_stream_thread_function, (void *)NULL, THREAD_ATTACHED);
}
thread_mutex_unlock(&event_stream_event_mutex);
thread_cond_broadcast(&event_stream_cond);
}
void event_stream_add_client(client_t *client)
@ -252,8 +254,7 @@ static void *event_stream_thread_function(void *arg)
ICECAST_LOG_INFO("Good morning!");
do {
thread_cond_wait(&event_stream_cond);
ICECAST_LOG_INFO("Tick!");
thread_cond_timedwait(&event_stream_cond, 1000);
{
avl_tree_wlock(client_tree);