From 1a33d2ef0aac95249c70f508c0957f3cdd34a238 Mon Sep 17 00:00:00 2001 From: Philip Schell Date: Tue, 10 Dec 2019 15:20:50 +0100 Subject: [PATCH] Stopping HTTPListener is in netcore different --- Bot-Utils/Webserver.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bot-Utils/Webserver.cs b/Bot-Utils/Webserver.cs index c105022..7851945 100644 --- a/Bot-Utils/Webserver.cs +++ b/Bot-Utils/Webserver.cs @@ -144,7 +144,10 @@ namespace BlubbFish.Utils.IoT.Bots { } public override void Dispose() { - this.httplistener.Stop(); + if(this.httplistener.IsListening) { + this.httplistener.Stop(); + } + this.httplistener.Close(); if(this.databackend != null) { this.databackend.Dispose();