mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Update: Run the check for removed events outside of the sending function
This commit is contained in:
parent
7f59a845a8
commit
a3e6c78f11
@ -247,13 +247,6 @@ static void event_stream_send_to_client(client_t *client)
|
||||
}
|
||||
}
|
||||
} while (going);
|
||||
|
||||
|
||||
if (state->current_event->removed) {
|
||||
ICECAST_LOG_INFO("Client %p %lu (%s) has fallen too far behind, removing",
|
||||
client, client->con->id, client->con->ip);
|
||||
client->con->error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void event_stream_cleanup_queue(void)
|
||||
@ -305,6 +298,14 @@ static void *event_stream_thread_function(void *arg)
|
||||
next = avl_get_next(next);
|
||||
|
||||
event_stream_send_to_client(client);
|
||||
{
|
||||
event_stream_clientstate_t *state = client->format_data;
|
||||
if (state->current_event->removed) {
|
||||
ICECAST_LOG_INFO("Client %p %lu (%s) has fallen too far behind, removing",
|
||||
client, client->con->id, client->con->ip);
|
||||
client->con->error = 1;
|
||||
}
|
||||
}
|
||||
if (client->con->error) {
|
||||
avl_delete(client_tree, (void *) client, _free_client);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user