diff --git a/Client/origin-client/scenes/init/init_screen.gd b/Client/origin-client/scenes/init/init_screen.gd index 537a1aa..6b13f6f 100644 --- a/Client/origin-client/scenes/init/init_screen.gd +++ b/Client/origin-client/scenes/init/init_screen.gd @@ -255,10 +255,11 @@ func _stop_pulse() -> void: ## Start (or restart) the sync watchdog. If no progress arrives within ## SYNC_TIMEOUT_SEC, surface the retry button so the user isn't stranded. func _start_sync_timeout() -> void: - _sync_timeout = get_tree().create_timer(SYNC_TIMEOUT_SEC) - _sync_timeout.timeout.connect(func() -> void: - if not is_inside_tree() or _sync_timeout == null: - return + var t := get_tree().create_timer(SYNC_TIMEOUT_SEC) + _sync_timeout = t + t.timeout.connect(func() -> void: + if not is_inside_tree() or _sync_timeout != t: + return # stale timer — a newer one has already replaced us _sync_timeout = null push_warning("InitScreen: sync timed out — showing retry") _on_sync_failed("Timed out — tap Retry to try again."),