Cleared up error messages around failed connections
This commit is contained in:
@@ -60,8 +60,7 @@ bool ArchipelagoClient::StartClient() {
|
|||||||
apClient->set_socket_error_handler([&](const std::string& msg) {
|
apClient->set_socket_error_handler([&](const std::string& msg) {
|
||||||
retries++;
|
retries++;
|
||||||
if (retries >= AP_Client_consts::MAX_RETRIES) {
|
if (retries >= AP_Client_consts::MAX_RETRIES) {
|
||||||
ArchipelagoConsole_SendMessage("[ERROR] Could not connect to server after several tries.\nAre the entered "
|
ArchipelagoConsole_SendMessage("[ERROR] Could not connect to server after several tries.\nAre the entered server address and port correct?");
|
||||||
"server address and slot name correct?");
|
|
||||||
CVarSetInteger(CVAR_REMOTE_ARCHIPELAGO("ConnectionStatus"), 2); // Connection error
|
CVarSetInteger(CVAR_REMOTE_ARCHIPELAGO("ConnectionStatus"), 2); // Connection error
|
||||||
disconnecting = true;
|
disconnecting = true;
|
||||||
|
|
||||||
@@ -70,7 +69,7 @@ bool ArchipelagoClient::StartClient() {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ArchipelagoConsole_SendMessage("[ERROR] Could not connect to server, retrying...");
|
ArchipelagoConsole_SendMessage(std::string("[ERROR] " + msg).c_str());
|
||||||
});
|
});
|
||||||
|
|
||||||
apClient->set_room_info_handler([&]() {
|
apClient->set_room_info_handler([&]() {
|
||||||
@@ -111,6 +110,13 @@ bool ArchipelagoClient::StartClient() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
apClient->set_slot_refused_handler([&](const std::list<std::string>& msgs) {
|
||||||
|
disconnecting = true;
|
||||||
|
for(const std::string& msg : msgs) {
|
||||||
|
ArchipelagoConsole_SendMessage(std::string("[ERROR] "+ msg).c_str());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
apClient->set_items_received_handler([&](const std::list<APClient::NetworkItem>& items) {
|
apClient->set_items_received_handler([&](const std::list<APClient::NetworkItem>& items) {
|
||||||
if (disconnecting) {
|
if (disconnecting) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user