mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05:00
Feature: Allow actually using more than one upstream
This commit is contained in:
parent
bde17102e2
commit
4b2a062aa0
15
src/slave.c
15
src/slave.c
@ -402,7 +402,20 @@ static void *start_relay_stream (void *arg)
|
||||
ICECAST_LOG_INFO("Starting relayed source at mountpoint \"%s\"", relay->config->localmount);
|
||||
do
|
||||
{
|
||||
client = open_relay_connection(relay, NULL);
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < relay->config->upstreams; i++) {
|
||||
ICECAST_LOG_DEBUG("For relay on mount \"%s\", trying upstream #%zu", relay->config->localmount, i);
|
||||
client = open_relay_connection(relay, &(relay->config->upstream[i]));
|
||||
if (client)
|
||||
break;
|
||||
}
|
||||
|
||||
/* if we have no upstreams defined, use the default upstream */
|
||||
if (!relay->config->upstreams) {
|
||||
ICECAST_LOG_DEBUG("For relay on mount \"%s\" with no upstreams trying upstream default", relay->config->localmount);
|
||||
client = open_relay_connection(relay, NULL);
|
||||
}
|
||||
|
||||
if (client == NULL)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user