mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
* Some connection handling changes.
This commit is contained in:
parent
54d43d30ab
commit
8ac8d36c03
3 changed files with 6 additions and 4 deletions
|
@ -1232,7 +1232,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
@Override
|
||||
public void disconnected(final boolean errorCall) {
|
||||
if (SwingUtilities.isEventDispatchThread()) { // Returns true if the current thread is an AWT event dispatching thread.
|
||||
logger.info("DISCONNECTED (Event Dispacth Thread)");
|
||||
logger.info("DISCONNECTED (Event Dispatch Thread)");
|
||||
setStatusText("Not connected");
|
||||
disableButtons();
|
||||
hideGames();
|
||||
|
@ -1250,6 +1250,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
if (performConnect()) {
|
||||
enableButtons();
|
||||
}
|
||||
} else {
|
||||
session.disconnect(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -305,7 +305,7 @@ public class MageActionCallback implements ActionCallback {
|
|||
}
|
||||
|
||||
private void sort(CardPanel card, JPanel container, boolean sortSource) {
|
||||
java.util.List<CardPanel> cards = new ArrayList<CardPanel>();
|
||||
java.util.List<CardPanel> cards = new ArrayList<>();
|
||||
for (Component component : container.getComponents()) {
|
||||
if (component instanceof CardPanel) {
|
||||
if (!component.equals(card)) {
|
||||
|
|
|
@ -251,8 +251,8 @@ public class SessionImpl implements Session {
|
|||
listenerMetadata.put(ConnectionValidator.VALIDATOR_PING_PERIOD, "1000000");
|
||||
listenerMetadata.put(ConnectionValidator.VALIDATOR_PING_TIMEOUT, "900000");
|
||||
} else {
|
||||
listenerMetadata.put(ConnectionValidator.VALIDATOR_PING_PERIOD, "10000");
|
||||
listenerMetadata.put(ConnectionValidator.VALIDATOR_PING_TIMEOUT, "9000");
|
||||
listenerMetadata.put(ConnectionValidator.VALIDATOR_PING_PERIOD, "15000");
|
||||
listenerMetadata.put(ConnectionValidator.VALIDATOR_PING_TIMEOUT, "13000");
|
||||
}
|
||||
callbackClient.connect(new ClientConnectionListener(), listenerMetadata);
|
||||
|
||||
|
|
Loading…
Reference in a new issue