Fix HTTP transport cleanup during Unity reload#5
Conversation
|
Thanks for sending this fix. I incorporated the HTTP transport cleanup pieces into The final release also expands address-in-use detection for Windows ( Validation before release included Unity compile/domain reload recovery and a port-occupied restart stress test where 12 concurrent starts reused one startup and recovered after the port was released. Released here: https://github.com/FunplayAI/funplay-unity-mcp/releases/tag/v0.3.6 Closing this PR as superseded by the release commit on |
|
Actually the version I patched is v0.3.6. Still buggy there. |
Summary
Why
In Unity 6000.5 beta on Windows, a domain reload can call MCPServerService.StopSync after the HTTP listener has already been closed/disposed. The current Stop() path logs:
Cannot access a disposed object. Object name: 'System.Net.HttpListener'.That leaves noisy console errors during reload/recompile and can make restart diagnosis harder. The same Windows environment can also surface address-in-use as 183/10048 or "Only one usage...", so this keeps the existing retry path effective there too.
Validation
.github/workflows/ci.yml: passed.git diff --check: passed.