From a0d5a8d40de9806e21e64475e3297a2a84effe22 Mon Sep 17 00:00:00 2001 From: vman Date: Wed, 30 Nov 2022 14:58:14 -0500 Subject: Project cleanup + analyzer updates --- .../WebSessionProviderEntry.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs') diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs index cf46c2b..382717b 100644 --- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs +++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs @@ -30,6 +30,7 @@ using VNLib.Utils.Logging; using VNLib.Utils.Extensions; using VNLib.Plugins.Extensions.Loading; using VNLib.Plugins.Essentials.Sessions.Runtime; +using VNLib.Data.Caching.Extensions; namespace VNLib.Plugins.Essentials.Sessions.VNCache { @@ -63,12 +64,11 @@ namespace VNLib.Plugins.Essentials.Sessions.VNCache string cachePrefix = webSessionConfig["cache_prefix"].GetString() ?? throw new KeyNotFoundException($"Missing required element 'cache_prefix' for config '{WEB_SESSION_CONFIG}'"); TimeSpan validFor = webSessionConfig["valid_for_sec"].GetTimeSpan(TimeParseType.Seconds); - //Init id factory WebSessionIdFactoryImpl idFactory = new(cookieSize, cookieName, cachePrefix, validFor); //Run client connection - _ = WokerDoWorkAsync(plugin, localized, idFactory, cacheConfig, webSessionConfig); + _ = plugin.DeferTask(() => WokerDoWorkAsync(plugin, localized, idFactory, cacheConfig, webSessionConfig)); } @@ -110,6 +110,10 @@ namespace VNLib.Plugins.Essentials.Sessions.VNCache { localized.Error("Missing required configuration variable for VnCache client: {0}", e.Message); } + catch (FBMServerNegiationException fne) + { + localized.Error("Failed to negotiate connection with cache server {reason}", fne.Message); + } catch (Exception ex) { localized.Error(ex, "Cache client error occured in session provider"); -- cgit