mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Fixed Issue 244
This commit is contained in:
parent
928ee4036a
commit
4534f11f3d
3 changed files with 26 additions and 7 deletions
|
|
@ -554,6 +554,10 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
return session.connect(connection);
|
||||
}
|
||||
|
||||
public static boolean stopConnecting() {
|
||||
return session.stopConnecting();
|
||||
}
|
||||
|
||||
public boolean autoConnect() {
|
||||
boolean autoConnect = Boolean.parseBoolean(prefs.get("autoConnect", "false"));
|
||||
if (autoConnect) {
|
||||
|
|
|
|||
|
|
@ -322,7 +322,6 @@ public class ConnectDialog extends MageDialog {
|
|||
try {
|
||||
get();
|
||||
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
btnConnect.setEnabled(true);
|
||||
if (result) {
|
||||
lblStatus.setText("");
|
||||
connected();
|
||||
|
|
@ -334,7 +333,13 @@ public class ConnectDialog extends MageDialog {
|
|||
logger.fatal("Update Players Task error", ex);
|
||||
} catch (ExecutionException ex) {
|
||||
logger.fatal("Update Players Task error", ex);
|
||||
} catch (CancellationException ex) {}
|
||||
} catch (CancellationException ex) {
|
||||
logger.info("Connect was canceled");
|
||||
lblStatus.setText("Connect was canceled");
|
||||
MageFrame.stopConnecting();
|
||||
} finally {
|
||||
btnConnect.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue