From fd74ea280b0c8973234383131d0350cfe6097df9 Mon Sep 17 00:00:00 2001 From: Jonathan Mezach Date: Thu, 12 Dec 2019 08:12:10 +0100 Subject: [PATCH] Do not crash host on Dispose --- src/Ocelot/Configuration/Repository/FileConfigurationPoller.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ocelot/Configuration/Repository/FileConfigurationPoller.cs b/src/Ocelot/Configuration/Repository/FileConfigurationPoller.cs index cca50d0b..9a2b67e6 100644 --- a/src/Ocelot/Configuration/Repository/FileConfigurationPoller.cs +++ b/src/Ocelot/Configuration/Repository/FileConfigurationPoller.cs @@ -105,7 +105,8 @@ namespace Ocelot.Configuration.Repository public void Dispose() { - _timer.Dispose(); + _timer?.Dispose(); + _timer = null; } } }