XX-net/XX-Net · error · Exception

time out

Error message

time out

What it means

Timeout exception from update_from_github.download_file: while global_var.running, if timeout - elapsed < 0 the download of a GitHub file (version manifest or release zip) aborts with Exception('time out'). Used by get_github_versions and download_overwrite_new_version for the auto-updater.

Source

Thrown at code/default/launcher/update_from_github.py:114

        try:
            xlog.info("download %s to %s, retry:%d", url, filename, i)
            req = request(url, i, timeout=120)
            if not req:
                continue

            start_time = time.time()
            timeout = 300

            if req.chunked:
                # don't known the file size, set to large for show the progress
                progress[url]["size"] = 20 * 1024 * 1024

                downloaded = 0
                with open(filename, 'wb') as fp:
                    while global_var.running:
                        time_left = timeout - (time.time() - start_time)
                        if time_left < 0:
                            raise Exception("time out")

                        dat = req.read(timeout=time_left)
                        if not dat:
                            break

                        fp.write(dat)
                        downloaded += len(dat)
                        progress[url]["downloaded"] = downloaded

                progress[url]["status"] = "finished"
                return True
            else:
                file_size = progress[url]["size"] = int(req.getheader(b'Content-Length', 0))

                left = file_size
                downloaded = 0
                with open(filename, 'wb') as fp:
                    while global_var.running:

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Retry the update later; transient GitHub slowness is the most common cause
  2. Increase the timeout argument to download_file
  3. Configure a proxy for GitHub access in launcher settings
  4. Download the release zip manually and update offline if updates keep failing
Defensive patterns

Strategy: retry

Try / catch

try:
    versions = get_github_versions()
except Exception as e:
    if 'time out' in str(e):
        time.sleep(60)
        versions = get_github_versions()
    else:
        raise

Prevention

When it happens

Trigger: Auto-update flow downloading update_v5.txt or the XX-Net release zip when GitHub is slow/blocked and the deadline expires; stalling connections also trigger it once the budget is spent.

Common situations: GitHub access blocked or throttled (GFW), release zip is tens of MB and timeout too small, flaky Wi-Fi during update.

Understand the failure class

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/82f930eea7651609. Report an issue: GitHub.