mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-06 16:31:08 +00:00
Modified OAuth server to try ports sequentially (PORT to PORT+10) if initial port is busy. Server now writes actual port used to a port file, which try_oauth_flow reads to construct the correct callback URL. Changes: - start_oauth_server: Added port range retry logic with EADDRINUSE handling - start_oauth_server: Now accepts port_file parameter to communicate actual port - try_oauth_flow: Waits for port allocation and reads actual port used - try_oauth_flow: Logs allocated port for user visibility - Backward compatible: PORT env var still respected as starting point Pattern: Before: Fixed port 5180 → fails if busy After: Try 5180, 5181, 5182... → resilient to port conflicts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||