1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-06 17:25:19 +00:00

Fix HTTPRequest timeout being scaled with Engine.time_scale

The server's response time won't change according to the engine's
time scale, so the timeout shouldn't be adjusted accordingly.
This commit is contained in:
Hugo Locurcio
2025-11-12 21:44:15 +01:00
parent bad1287b62
commit b7f537c863
2 changed files with 3 additions and 1 deletions

View File

@@ -667,6 +667,7 @@ HTTPRequest::HTTPRequest() {
tls_options = TLSOptions::client();
timer = memnew(Timer);
timer->set_one_shot(true);
timer->set_ignore_time_scale(true);
timer->connect("timeout", callable_mp(this, &HTTPRequest::_timeout));
add_child(timer);
}