mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Resolves #372 - Icecast reconnect following network outage. Updates
the lost connection timeout from default of 60 seconds down to 5 seconds so that the connection state updates more quickly. Removed complex error handling and replaced with a simpler approach to catch an error and disconnect and then attempt a reconnect. Added new 'Network Unavailable' error state that detects when the network connection is unavaialable. Updated the icecast metadata updater to close the TCP session after successfully writing metadata to the socket.
This commit is contained in:
@@ -20,9 +20,14 @@ package io.github.dsheirer.audio.broadcast;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
|
||||
public class BroadcastStatusPanel extends JPanel
|
||||
{
|
||||
@@ -96,7 +101,8 @@ public class BroadcastStatusPanel extends JPanel
|
||||
setBackground(table.getBackground());
|
||||
setForeground(Color.LIGHT_GRAY);
|
||||
}
|
||||
else if(state == BroadcastState.INVALID_SETTINGS)
|
||||
else if(state == BroadcastState.INVALID_SETTINGS ||
|
||||
state == BroadcastState.NETWORK_UNAVAILABLE)
|
||||
{
|
||||
setBackground(Color.YELLOW);
|
||||
setForeground(table.getForeground());
|
||||
|
||||
Reference in New Issue
Block a user