mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
Cleaned up "value assigned is not used in any execution path"
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Buffers;
|
||||
@@ -182,7 +182,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
}
|
||||
|
||||
WebSocketMessage<object>? stub;
|
||||
long bytesConsumed = 0;
|
||||
long bytesConsumed;
|
||||
try
|
||||
{
|
||||
stub = DeserializeWebSocketMessage(buffer, out bytesConsumed);
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
Logger.LogInformation("Opening HDHR UDP Live stream from {host}", uri.Host);
|
||||
|
||||
var remoteAddress = IPAddress.Parse(uri.Host);
|
||||
IPAddress localAddress = null;
|
||||
IPAddress localAddress;
|
||||
using (var tcpClient = new TcpClient())
|
||||
{
|
||||
try
|
||||
|
||||
@@ -258,7 +258,6 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||
}
|
||||
|
||||
// Expire stale connection requests
|
||||
var code = string.Empty;
|
||||
var values = _currentRequests.Values.ToList();
|
||||
|
||||
for (int i = 0; i < values.Count; i++)
|
||||
@@ -266,7 +265,7 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||
var added = values[i].DateAdded ?? DateTime.UnixEpoch;
|
||||
if (DateTime.UtcNow > added.AddMinutes(Timeout) || expireAll)
|
||||
{
|
||||
code = values[i].Code;
|
||||
var code = values[i].Code;
|
||||
_logger.LogDebug("Removing expired request {code}", code);
|
||||
|
||||
if (!_currentRequests.TryRemove(code, out _))
|
||||
|
||||
Reference in New Issue
Block a user