Merge pull request #160 from DSheirer/159-icecast-unresolved-host

159 icecast unresolved host
This commit is contained in:
Denny Sheirer
2017-01-29 06:17:44 -05:00
committed by GitHub
2 changed files with 8 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.net.InetSocketAddress;
import java.net.URLEncoder;
import java.nio.channels.UnresolvedAddressException;
import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
@@ -152,6 +153,10 @@ public class IcecastBroadcastMetadataUpdater implements IBroadcastMetadataUpdate
{
//Do nothing, the server is unavailable
}
else if(throwableCause instanceof UnresolvedAddressException)
{
//Do nothing - the server is temporarily unavailable
}
else
{
if(!mStackTraceLoggingSuppressed)

View File

@@ -59,10 +59,10 @@ public class IcecastHTTPAudioBroadcaster extends IcecastAudioBroadcaster
private AtomicBoolean mConnecting = new AtomicBoolean();
/**
* Creates an Icecast 2.3.2 compatible broadcaster using TCP and a pseudo HTTP 1.0 protocol. This broadcaster is
* compatible with Icecast version 2.3.2 and older versions of the server software.
* Creates an Icecast 2.4.x compatible broadcaster using HTTP 1.1 protocol. This broadcaster is
* compatible with Icecast version 2.4.x and newer versions of the server software.
*
* Note: use @see IcecastHTTPAudioBroadcaster for Icecast version 2.4.x and newer.
* Note: use @see IcecastTCPAudioBroadcaster for Icecast version 2.3.x and older.
*
* This broadcaster uses the Apache Mina library for the streaming socket connection and for metadata updates. The
* IcecastHTTPIOHandler manages all interaction with the Icecast server and manages the overall broadcast state.