Improve NetPlay connection error handling

This commit is contained in:
Techjar committed 2018-07-05 17:15:19 -04:00
1 parent f5730e1636
commit a29cdb5713
6 files changed
+24 -12

No files matched your search

@@ -558,6 +558,14 @@ void NetPlayDialog::OnConnectionLost()
DisplayMessage(tr("Lost connection to NetPlay server..."), "red");
}
void NetPlayDialog::OnConnectionError(const std::string& message)
{
QueueOnObject(this, [this, message] {
QMessageBox::critical(this, tr("Error"),
tr("Failed to connect to server: %1").arg(tr(message.c_str())));
});
}
void NetPlayDialog::OnTraversalError(TraversalClient::FailureReason error)
{
QueueOnObject(this, [this, error] {