Improve NetPlay connection error handling

This commit is contained in:
Techjar
2018-07-01 22:52:43 -04:00
parent f5730e1636
commit a29cdb5713
6 changed files with 24 additions and 12 deletions

View File

@ -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] {