aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs
diff options
context:
space:
mode:
authorBond_009 <Bond.009@outlook.com>2020-05-25 23:52:51 +0200
committerBond_009 <Bond.009@outlook.com>2020-05-25 23:52:51 +0200
commit10e381f66f957ffa2e8339a02b0c970086673739 (patch)
tree8890b624e81a8183462206621ade0e0138172d22 /Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs
parent777c9c7bc974fafb09e6a5a6b23bd29cf8529af9 (diff)
Fix some 'bugs' flagged by sonarcloud
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs')
-rw-r--r--Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs b/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs
index ee5131c1f..5554aa97f 100644
--- a/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs
+++ b/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs
@@ -208,8 +208,9 @@ namespace Emby.Server.Implementations.SocketSharp
private static string GetQueryStringContentType(HttpRequest httpReq)
{
- ReadOnlySpan<char> format = httpReq.Query["format"].ToString();
- if (format == null)
+ string formatStr = httpReq.Query["format"].ToString();
+ ReadOnlySpan<char> format = formatStr;
+ if (formatStr == null)
{
const int FormatMaxLength = 4;
ReadOnlySpan<char> pi = httpReq.Path.ToString();