Skip to content

Add timeout for wineserver wait in daemon stop#60

Merged
h4rm0n1c merged 2 commits intomainfrom
codex/fix-stop-command-issue-in-nettts-daemon.sh
Jan 18, 2026
Merged

Add timeout for wineserver wait in daemon stop#60
h4rm0n1c merged 2 commits intomainfrom
codex/fix-stop-command-issue-in-nettts-daemon.sh

Conversation

@h4rm0n1c
Copy link
Copy Markdown
Owner

Motivation

  • The stop path could hang when invoking wineserver -w, causing the daemon stop command to block indefinitely.
  • Introduce a bounded wait to ensure nettts-daemon.sh stop reliably returns even if wineserver misbehaves.
  • Make the wait duration configurable so users can tune behavior for their environment via an environment variable.

Description

  • Add a new configurable variable WINESERVER_WAIT (from NETTTS_WINESERVER_WAIT) with a default of 5 seconds and validate its value.
  • Implement wait_for_wineserver() which prefers timeout if available and otherwise runs wineserver -w in a background waiter loop with a manual timeout and warnings.
  • Replace the direct wineserver -w invocation in stop_daemon() with the new wait_for_wineserver() helper.
  • Emit warnings and fall back to sane defaults when NETTTS_WINESERVER_WAIT is invalid or when the wait times out.

Testing

  • No automated tests were run for this change.

Codex Task

@h4rm0n1c h4rm0n1c merged commit 38354fe into main Jan 18, 2026
2 checks passed
@h4rm0n1c h4rm0n1c deleted the codex/fix-stop-command-issue-in-nettts-daemon.sh branch January 18, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant