cosmetics

This commit is contained in:
UbitUmarov
2024-12-22 23:29:34 +00:00
parent 1edd874055
commit 4088b5d165
6 changed files with 13 additions and 15 deletions

View File

@@ -61,12 +61,11 @@ namespace OSHttpServer
private void OnFreeContext(object sender, DisconnectedEventArgs e)
{
var imp = sender as HttpClientContext;
if (imp == null || imp.contextID < 0)
return;
m_activeContexts.TryRemove(imp.contextID, out HttpClientContext dummy);
imp.Close();
if (sender is HttpClientContext imp && imp.contextID >= 0)
{
m_activeContexts.TryRemove(imp.contextID, out _);
imp.Close();
}
}