mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-05 03:17:15 +00:00
fix(capture): replay retries the first auth connection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,10 @@ namespace {
|
|||||||
// The recording has no login: log in on the target with the replay's account (not compared)
|
// The recording has no login: log in on the target with the replay's account (not compared)
|
||||||
bool Login() {
|
bool Login() {
|
||||||
FakeClient client;
|
FakeClient client;
|
||||||
if (!client.Connect(m_Options.host, m_Options.authPort, 10s)) {
|
// Auth can take a moment to take connections after it first answers
|
||||||
|
bool connected = false;
|
||||||
|
for (int attempt = 0; attempt < 3 && !connected; attempt++) connected = client.Connect(m_Options.host, m_Options.authPort, 10s);
|
||||||
|
if (!connected) {
|
||||||
Stop("Can't connect to auth at " + m_Options.host + ":" + std::to_string(m_Options.authPort));
|
Stop("Can't connect to auth at " + m_Options.host + ":" + std::to_string(m_Options.authPort));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user