Skip to content

Fix Windows tray auto reconnect by passing config to oneshot - #23

Merged
silverling merged 1 commit into
silverling:mainfrom
8rief:fix/windows-oneshot-config
May 16, 2026
Merged

Fix Windows tray auto reconnect by passing config to oneshot#23
silverling merged 1 commit into
silverling:mainfrom
8rief:fix/windows-oneshot-config

Conversation

@8rief

@8rief 8rief commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This fixes Windows tray/server auto reconnect after offline detection.

The Windows server entrypoint was calling oneshot() without a config object. This stayed hidden while the network was already online because oneshot() returned before reaching login(config). Once offline, the reconnect loop called login(config), which accessed config.url and failed because config was undefined.

The patch loads config once in src/windows/main.ts and passes it to both the scheduled routine and the manual /login route.

It also redacts the password from trace logging in src/lib/login.ts.

Verification

  • bunx tsc --noEmit
  • bun run -F xdwlan-login build:windows
  • cargo build --release
  • Windows server smoke test: /health returns ok, /quit returns ok

Fixes #22.

@silverling

Copy link
Copy Markdown
Owner

Thanks for your contribution! Sorry for my lateness. LGTM.

@silverling
silverling merged commit e35c931 into silverling:main May 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows tray auto reconnect fails because oneshot is called without config

2 participants