From 2dcfe17741ba0a97424c1c5a933d3039413a0209 Mon Sep 17 00:00:00 2001 From: nem Date: Sat, 15 Jan 2022 15:09:40 +1100 Subject: [PATCH] Fixes cobbr/Covenant#348 --- Covenant/Core/DbInitializer.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Covenant/Core/DbInitializer.cs b/Covenant/Core/DbInitializer.cs index 59783ba5..ba53ba85 100644 --- a/Covenant/Core/DbInitializer.cs +++ b/Covenant/Core/DbInitializer.cs @@ -100,7 +100,14 @@ await service.CreateEntities( foreach (Listener l in listeners) { - await service.StartListener(l.Id); + try { + await service.StartListener(l.Id); + } + catch { + Console.WriteLine("Listener " + l.Id + " failed to start and has been stopped."); + l.Status = ListenerStatus.Stopped; + await service.EditListener(l); + } } }