Resolves #176 - 2 issues:

A) streaming connection errors - detects errors and if currently connected, resets the connection.

B)duplicate calls being streamed - issue with comparison of broadcast channels allowed the same broadcast channel to be queued two or more times for the list of channels to stream a recording.
This commit is contained in:
Denny
2017-02-10 17:05:28 -05:00
parent 2543072e08
commit 34dd2161ef
4 changed files with 115 additions and 71 deletions

View File

@@ -707,7 +707,9 @@ public class BroadcastModel extends AbstractTableModel implements Listener<Audio
if(metadata != null && metadata.isStreamable())
{
for(BroadcastChannel broadcastChannel : metadata.getBroadcastChannels())
List<BroadcastChannel> broadcastChannels = metadata.getBroadcastChannels();
for(BroadcastChannel broadcastChannel : broadcastChannels)
{
String channelName = broadcastChannel.getChannelName();

View File

@@ -248,6 +248,12 @@ public class IcecastTCPAudioBroadcaster extends IcecastAudioBroadcaster
{
String reason = ioe.getMessage();
if(connected())
{
mLog.info("Streaming connection error detected - resetting connection - " + reason);
disconnect();
connect();
}
if(reason.startsWith("Connection reset"))
{
mLog.info("Streaming connection reset by remote server - reestablishing connection");
@@ -264,14 +270,14 @@ public class IcecastTCPAudioBroadcaster extends IcecastAudioBroadcaster
{
setBroadcastState(BroadcastState.ERROR);
disconnect();
mLog.error("Unrecognized IO error: " + reason + ". Streaming halted.");
mLog.error("Unrecognized IO error: " + reason + ". Streaming halted.", cause);
}
}
else
{
setBroadcastState(BroadcastState.ERROR);
disconnect();
mLog.error("Unspecified IO error - streaming halted.");
mLog.error("Unspecified IO error - streaming halted.", cause);
}
}
else