aboutsummaryrefslogtreecommitdiff
path: root/aoapplication.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2017-07-24 22:44:35 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2017-07-24 22:44:35 -0500
commit294d2150d02950b932cddacf3994e9e1a47abccb (patch)
treefba5731a75b26b351d875396dfb77bc76a9260b6 /aoapplication.cpp
parent1fe290aa74fb7ebfedfcec7aa1c7d6bd7fe32a91 (diff)
Change basic connection to DNS SRV lookup for master server failover
Diffstat (limited to 'aoapplication.cpp')
-rw-r--r--aoapplication.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/aoapplication.cpp b/aoapplication.cpp
index 179732da..8ee33b0f 100644
--- a/aoapplication.cpp
+++ b/aoapplication.cpp
@@ -12,6 +12,7 @@
AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv)
{
net_manager = new NetworkManager(this);
+ QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool)), SLOT(ms_connect_finished(bool)));
}
AOApplication::~AOApplication()
@@ -134,3 +135,20 @@ void AOApplication::loading_cancelled()
w_lobby->hide_loading_overlay();
}
+
+void AOApplication::ms_connect_finished(bool connected)
+{
+ if (connected)
+ {
+ AOPacket *f_packet = new AOPacket("ALL#%");
+ send_ms_packet(f_packet);
+ }
+ else
+ {
+ call_error("There was an error connecting to the master server.\n"
+ "We deploy multiple master servers to mitigate any possible downtime,"
+ "but the client appears to have exhausted all possible methods of finding"
+ "and connecting to one.\n"
+ "Please check your Internet connection and firewall, and please try again.");
+ }
+}