Skip to content

Exit with an error when the proxy server fails to listen (#1036) - #2923

Open
dj803 wants to merge 1 commit into
daid:masterfrom
dj803:drowa/ee1036-proxy-exit
Open

dj803 wants to merge 1 commit into
daid:masterfrom
dj803:drowa/ee1036-proxy-exit

Conversation

@dj803

@dj803 dj803 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Depends on daid/SeriousProton#319, which adds GameServerProxy::isListening(). Merge that first; until then this does not compile against SeriousProton master, so CI here will fail.

runProxyServer now keeps the proxy in a P<GameServerProxy>; if !isListening() it logs Proxy server failed to listen on port N, exiting., destroys the proxy and returns 1 instead of running the main loop with nobody able to connect (e.g. port already in use). Useful for scripts/service managers that start proxy=....

Fixes #1036.

Tested (Windows 11, MSVC, RelWithDebInfo, EE branch built against the SP branch)

EmptyEpsilon.exe proxy=listen:0:x:<port>, 15 s timeout:

case result
port held by exclusive dual-stack socket exit code 1 after 0.2 s; log: Failed to listen on TCP port: 36664, Proxy server failed to listen on port 36664, exiting.
free port keeps running for 15 s (killed by test), no error
port held, build without this change keeps running, no error (bug reproduced)

Not tested

Linux/macOS; connect-to-host proxy mode (proxy=host:port:...); a real client connecting through the proxy; non-exclusive occupiers on Windows (SO_REUSEADDR lets bind succeed); full test suite/CI (none on the fork).

🤖 Generated with Claude Code

Requires SeriousProton GameServerProxy::isListening(). Refs daid#1036.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dj803

dj803 commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

SeriousProton#319 has been merged, so this should build now. Could the CI be re-run when you have a moment?

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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.

proxy servers and failed to bind to listener

1 participant