Skip to content

Commit

Permalink
Fix NRE in InProc store
Browse files Browse the repository at this point in the history
Fixes aspnet#94
  • Loading branch information
duncansmart committed Aug 8, 2023
1 parent 06de5f5 commit 4867180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SessionStateModule/SessionStateStoreProviderAsyncBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public override void Initialize(string name, NameValueCollection config)
// So we have inserted this setting here and it will apply to all providers that this async module can use.

// skipKeepAliveWhenUnused
var skipKA = config["skipKeepAliveWhenUnused"];
var skipKA = config?["skipKeepAliveWhenUnused"];
if (skipKA != null && !bool.TryParse(skipKA, out _skipKeepAliveWhenUnused))
{
throw new ConfigurationErrorsException(string.Format(SR.Invalid_provider_option, "skipKeepAliveWhenUnused", name));
Expand All @@ -215,4 +215,4 @@ public override void Initialize(string name, NameValueCollection config)
private bool _skipKeepAliveWhenUnused = false;
internal bool SkipKeepAliveWhenUnused { get { return _skipKeepAliveWhenUnused; } }
}
}
}

0 comments on commit 4867180

Please sign in to comment.