mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
2 on-demand relay fixups.
We prevent a failed relay from restarting too quickly but don't prevent connecting listeners from getting to the source_t during that time. Drop the on-demand status in the source_t during this period so listeners are rejected. The setting is reset from relay eventually. Relays without matching mount sections had no stats initially. svn path=/icecast/trunk/icecast/; revision=15122
This commit is contained in:
parent
26c9b65eb0
commit
c6a0b4cc8b
@ -367,6 +367,7 @@ static void *start_relay_stream (void *arg)
|
||||
source_clear_source (relay->source);
|
||||
|
||||
/* cleanup relay, but prevent this relay from starting up again too soon */
|
||||
relay->source->on_demand = 0;
|
||||
relay->start = time(NULL) + max_interval;
|
||||
relay->cleanup = 1;
|
||||
|
||||
@ -391,7 +392,15 @@ static void check_relay_stream (relay_server *relay)
|
||||
{
|
||||
DEBUG1("Adding relay source at mountpoint \"%s\"", relay->localmount);
|
||||
if (relay->on_demand)
|
||||
{
|
||||
ice_config_t *config = config_get_config ();
|
||||
mount_proxy *mountinfo = config_find_mount (config, relay->localmount);
|
||||
if (mountinfo == NULL)
|
||||
source_update_settings (config, relay->source, mountinfo);
|
||||
config_release_config ();
|
||||
stats_event (relay->localmount, "listeners", "0");
|
||||
slave_update_all_mounts();
|
||||
}
|
||||
}
|
||||
else
|
||||
WARN1 ("new relay but source \"%s\" already exists", relay->localmount);
|
||||
|
Loading…
x
Reference in New Issue
Block a user