Skip to content

Commit

Permalink
Start ZPages HttpListener sooner (#3463)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest authored Jul 20, 2022
1 parent d93606e commit 3d6be9c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public void Start(CancellationToken token = default)
new CancellationTokenSource() :
CancellationTokenSource.CreateLinkedTokenSource(token);

this.httpListener.Start();

this.workerThread = Task.Factory.StartNew(this.WorkerThread, default, TaskCreationOptions.LongRunning, TaskScheduler.Default);
}
}
Expand Down Expand Up @@ -110,8 +112,6 @@ protected virtual void Dispose(bool disposing)

private void WorkerThread()
{
this.httpListener.Start();

try
{
while (!this.tokenSource.IsCancellationRequested)
Expand Down

0 comments on commit 3d6be9c

Please sign in to comment.