[PR #52] [moonlight-proxy] make /launch timeout configurable to survive cold starts #54

Open
opened 2026-10-15 12:47:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/fenrir/pull/52
Author: @shrinedogg
Created: 7/25/2026
Status: 🔄 Open

Base: main ← Head: fix/cold-start-timeout


📝 Commits (2)

  • 2828835 [moonlight-proxy] raise launch wait from 25s to 120s
  • 021da17 [moonlight-proxy] make launch timeout configurable

📊 Changes

3 files changed (+40 additions, -7 deletions)

View changed files

📝 README.md (+14 -2)
📝 cmd/moonlight-proxy/main.go (+6 -3)
📝 pkg/moonlight/rest.go (+20 -2)

📄 Description

Problem

/launch waited a hard-coded 25s for the operator to create a Session and
expose its stream URL. A cold start (image pull + wolf boot + wolf-agent
readiness) routinely takes 30–60s, so the first launch after a deploy almost
always timed out with HTTP 500 — the client disconnected and the half-started
session was torn down.

Solution

Replace the hard-coded 25s with a configurable --launch-timeout flag
(default 60s). The poll stays bound to r.Context(), so a disconnecting
client still cancels the wait early regardless of the configured value.

Changes

  • Add LaunchTimeout to RESTServerOptions (defaults to 60s if unset).
  • Add --launch-timeout flag to moonlight-proxy.
  • Replace the hard-coded 25s in launchHandler with s.LaunchTimeout.
  • Document the flag in README.md.

Supersedes the earlier hard-coded 120s bump with a tunable default. The
RenderNode struct-tag fix is tracked separately on fix/rendernode-struct-tag.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/fenrir/pull/52 **Author:** [@shrinedogg](https://github.com/shrinedogg) **Created:** 7/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/cold-start-timeout` --- ### 📝 Commits (2) - [`2828835`](https://github.com/games-on-whales/fenrir/commit/28288350ce85f16a2e95eee302d9ab58f623927d) [moonlight-proxy] raise launch wait from 25s to 120s - [`021da17`](https://github.com/games-on-whales/fenrir/commit/021da17e54880bd73e937c5872a5842141f8e929) [moonlight-proxy] make launch timeout configurable ### 📊 Changes **3 files changed** (+40 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+14 -2) 📝 `cmd/moonlight-proxy/main.go` (+6 -3) 📝 `pkg/moonlight/rest.go` (+20 -2) </details> ### 📄 Description ## Problem `/launch` waited a hard-coded `25s` for the operator to create a `Session` and expose its stream URL. A cold start (image pull + wolf boot + `wolf-agent` readiness) routinely takes 30–60s, so the first launch after a deploy almost always timed out with HTTP 500 — the client disconnected and the half-started session was torn down. ## Solution Replace the hard-coded `25s` with a configurable `--launch-timeout` flag (default `60s`). The poll stays bound to `r.Context()`, so a disconnecting client still cancels the wait early regardless of the configured value. ## Changes - Add `LaunchTimeout` to `RESTServerOptions` (defaults to `60s` if unset). - Add `--launch-timeout` flag to `moonlight-proxy`. - Replace the hard-coded `25s` in `launchHandler` with `s.LaunchTimeout`. - Document the flag in `README.md`. Supersedes the earlier hard-coded `120s` bump with a tunable default. The `RenderNode` struct-tag fix is tracked separately on `fix/rendernode-struct-tag`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/fenrir#54
No description provided.