Description:
Running multiple Unreal Editor instances on one machine can require each instance to find an available HTTPServer port. If another instance already holds a candidate port, the caller should be able to try the next port without treating that expected collision as an error. The same capability would benefit other HTTPServer users that select a port from a range.
GetHttpRouter(Port, true) already returns nullptr on a failed bind, but the listener logs the failure as an Error. We propose TryGetHttpRouter(Port) for port probing: it returns nullptr when binding fails and logs the expected bind collision at Verbose. Existing GetHttpRouter behavior remains unchanged.
Proposed change and automation test: https://github.com/EpicGames/UnrealEngine/pull/15216
Would Epic accept this API and logging behavior upstream, or prefer another approach to probing candidate HTTPServer ports?
[Attachment Removed]
Steps to Reproduce
1. Use an unmodified Unreal Engine with HTTPServer enabled. Start HTTPServer listeners so requesting a router attempts to bind immediately.
2. In another process, bind and listen on a TCP port that HTTPServer will try to use.
3. Call FHttpServerModule::Get().GetHttpRouter(Port, true) with that occupied port.
4. Observe that the call returns nullptr, as expected, but FHttpListener logs the bind failure as an Error. Trying another available port can succeed; the first failure was an expected part of port selection.
[Attachment Removed]
Hi,
Thank you for the report and pull request. I can confirm the PR has been received in our internal tracker, and it will be routed to the appropriate subject matter expert for review. Unfortunately, with other bug fixes and tasks taking priority, I cannot provide any estimate as to when this change will be reviewed. I have also reached out to the team directly to let them know about this PR. If they have any immediate feedback, I’ll be sure to let you know here. Otherwise, someone will reach out either here or on the PR as soon as they are able.
Thanks,
Alex
[Attachment Removed]