mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-06-15 10:04:41 +02: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:
https://github.com/WireMock-Net/WireMock.Net/blob/2075589e987c863c99bfcebe3c8692c5d678e510/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: