You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Ramp up remote debugger wait time
This commit is contained in:
@@ -67,17 +67,20 @@ Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_por
|
|||||||
|
|
||||||
int port = p_port;
|
int port = p_port;
|
||||||
|
|
||||||
int tries = 3;
|
const int tries = 6;
|
||||||
|
int waits[tries] = { 1, 10, 100, 1000, 1000, 1000 };
|
||||||
|
|
||||||
tcp_client->connect_to_host(ip, port);
|
tcp_client->connect_to_host(ip, port);
|
||||||
|
|
||||||
while (tries--) {
|
for (int i = 0; i < tries; i++) {
|
||||||
|
|
||||||
if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
|
if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
OS::get_singleton()->delay_usec(1000000);
|
const int ms = waits[i];
|
||||||
print_line("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in 1 sec.");
|
OS::get_singleton()->delay_usec(ms * 1000);
|
||||||
|
print_line("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user