How to reproduce:
1. Open the attached “WebServerTest.zip“ project
2. Open the “SampleScene“ Scene
3. Open the Test Runner window (Window>General>Test Runner)
4. Select the “PlayMode“ tab and press “Run All“ (this step usually needs to be repeated up to 20 times for the error to appear)
Expected result: No errors in the Console
Actual result: “Curl error 56: Recv failure: Connection was reset“ error in the Console
Reproducible with: 2021.3.29f1, 2022.3.6f1, 2023.1.6f1, 2023.2.0b2
Reproduced on: Windows 10
Not reproducible on: macOS 13.4.1 (Intel)
Notes:
- Not reproducible in a test Player
- Running tests using Flask and a standalone C# application as the web server didn’t result in the error
- The server implementation can be changed by removing the “ListenOriginalWebServer” Script from the “Server“ GameObject and adding the “ListenOriginalWebServer“ Script (Task implementation) or the “SimpleWebServerAlt“ Script (Coroutine implementation)
- Also there is a standalone visual studio “StandaloneServer“ project attached with code similar to the task implementation that works without encountering the error (the project needs to be compiled and any server component removed from the “Server” GameObject to test it)