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

@@ -372,7 +372,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveWebSocketHandler(string servicepath)
{
m_WebSocketHandlers.TryRemove(servicepath, out WebSocketRequestDelegate dummy);
m_WebSocketHandlers.TryRemove(servicepath, out _);
}
public List<string> GetStreamHandlerKeys()
@@ -526,7 +526,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveIndexPHPMethodHandler(string key)
{
m_indexPHPmethods.TryRemove(key, out SimpleStreamMethod sh);
m_indexPHPmethods.TryRemove(key, out _);
}
public SimpleStreamMethod TryGetIndexPHPMethodHandler(string key)
@@ -543,7 +543,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public void RemoveGlobalPMethodHandler(string key)
{
m_globalMethods.TryRemove(key, out SimpleStreamMethod sh);
m_globalMethods.TryRemove(key, out _);
}
public bool TryGetGlobalMethodHandler(string key, out SimpleStreamMethod sh)

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();
}
}