Skip to content

Commit

Permalink
Add timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Nov 7, 2024
1 parent 1a77fbe commit 489105c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Engine/Kestrel/Hosting/KestrelServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ internal KestrelServer(IServerCompanion? companion, ServerConfiguration configur
startEvent.Set();
});

startEvent.Wait();
var started = startEvent.Wait(5000);

if (!started) throw new InvalidOperationException("Server did not start within 5 seconds");
}

#endregion
Expand Down

0 comments on commit 489105c

Please sign in to comment.