mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
fix: Add yield statement to ensure host finishes starting before logging or connecting
This commit is contained in:
@@ -15,6 +15,9 @@ public sealed class ServerDirectoryService(
|
|||||||
|
|
||||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||||
{
|
{
|
||||||
|
// Yield to let the host finish starting before we log or connect
|
||||||
|
await Task.Yield();
|
||||||
|
|
||||||
var isPublic = configuration.GetValue<bool>("Server:PublicServer");
|
var isPublic = configuration.GetValue<bool>("Server:PublicServer");
|
||||||
if (!isPublic)
|
if (!isPublic)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user