mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Issue: AspNetCoreSelfHost.IsStarted set before the server actually started for real #140
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davide-romanini on GitHub (Sep 2, 2018).
From this code:
2075589e98/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs (L107-L117)is clear that
IsStartedis set to true before theWebHostistance is running for real.That causes sporadic "Connection refused" failures with code like this:
A better implementation could be listening for
IApplicationLifetimeevents: