diff --git a/Rest.Net/Rest.Net/RouteListener.cs b/Rest.Net/Rest.Net/RouteListener.cs index b54a348..af818e2 100644 --- a/Rest.Net/Rest.Net/RouteListener.cs +++ b/Rest.Net/Rest.Net/RouteListener.cs @@ -197,7 +197,7 @@ namespace MontoyaTech.Rest.Net /// public void Block() { - while (this.HttpListener != null) + while (this.HttpListener != null && Thread.CurrentThread.ThreadState != ThreadState.AbortRequested && Thread.CurrentThread.ThreadState != ThreadState.Aborted) if (!Thread.Yield()) Thread.Sleep(1000); }