forked from External/mage
fixed auto reconnect feature
This commit is contained in:
parent
7e7a17e1d7
commit
2b8afe379a
6 changed files with 12 additions and 34 deletions
|
|
@ -54,7 +54,6 @@ import org.jboss.remoting.transport.bisocket.Bisocket;
|
|||
import org.jboss.remoting.transport.socket.SocketWrapper;
|
||||
import org.jboss.remoting.transporter.TransporterClient;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
import mage.constants.ManaType;
|
||||
|
|
@ -1318,9 +1317,6 @@ public class SessionImpl implements Session {
|
|||
if (isConnected()) {
|
||||
if (!server.ping(sessionId)) {
|
||||
logger.error(new StringBuilder("Ping failed: ").append(this.getUserName()).append(" Session: ").append(sessionId).append(" to MAGE server at ").append(connection.getHost()).append(":").append(connection.getPort()).toString());
|
||||
if (JOptionPane.showConfirmDialog(null, "The connection to server was lost. Reconnect?", "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||
client.reconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue