aboutsummaryrefslogtreecommitdiff
path: root/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
diff options
context:
space:
mode:
authorLibravatar vman <public@vaughnnugent.com>2022-11-30 14:58:14 -0500
committerLibravatar vman <public@vaughnnugent.com>2022-11-30 14:58:14 -0500
commita0d5a8d40de9806e21e64475e3297a2a84effe22 (patch)
tree510ffabe5a8617e7a9388641bf5aefb2fd51742d /Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
parent71ad09dda9ac67ef481d115fb9544dcd56834f22 (diff)
Project cleanup + analyzer updates
Diffstat (limited to 'Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs')
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs8
1 files changed, 6 insertions, 2 deletions
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");