Some fixes to reconnect handling.

This commit is contained in:
LevelX2 2014-09-28 15:45:15 +02:00
parent dc1f3ff3d8
commit 2835a4e152
3 changed files with 24 additions and 4 deletions

View file

@ -1231,12 +1231,14 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
@Override
public void disconnected(final boolean errorCall) {
if (SwingUtilities.isEventDispatchThread()) {
if (SwingUtilities.isEventDispatchThread()) { // Returns true if the current thread is an AWT event dispatching thread.
logger.info("DISCONNECTED (Event Dispacth Thread)");
setStatusText("Not connected");
disableButtons();
hideGames();
hideTables();
} else {
logger.info("DISCONNECTED (NO Event Dispacth Thread)");
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {