mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Remove dead code and improve logging
This commit is contained in:
@@ -77,8 +77,6 @@ namespace MediaBrowser.Controller.Net
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
/// <summary>
|
||||
/// Starts sending messages over a web socket
|
||||
/// </summary>
|
||||
@@ -87,12 +85,12 @@ namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
var vals = message.Data.Split(',');
|
||||
|
||||
var dueTimeMs = long.Parse(vals[0], UsCulture);
|
||||
var periodMs = long.Parse(vals[1], UsCulture);
|
||||
var dueTimeMs = long.Parse(vals[0], CultureInfo.InvariantCulture);
|
||||
var periodMs = long.Parse(vals[1], CultureInfo.InvariantCulture);
|
||||
|
||||
var cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
Logger.LogDebug("{1} Begin transmitting over websocket to {0}", message.Connection.RemoteEndPoint, GetType().Name);
|
||||
Logger.LogDebug("WS {1} begin transmitting to {0}", message.Connection.RemoteEndPoint, GetType().Name);
|
||||
|
||||
var state = new TStateType
|
||||
{
|
||||
@@ -196,7 +194,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <param name="connection">The connection.</param>
|
||||
private void DisposeConnection(Tuple<IWebSocketConnection, CancellationTokenSource, TStateType> connection)
|
||||
{
|
||||
Logger.LogDebug("{1} stop transmitting over websocket to {0}", connection.Item1.RemoteEndPoint, GetType().Name);
|
||||
Logger.LogDebug("WS {1} stop transmitting to {0}", connection.Item1.RemoteEndPoint, GetType().Name);
|
||||
|
||||
// TODO disposing the connection seems to break websockets in subtle ways, so what is the purpose of this function really...
|
||||
// connection.Item1.Dispose();
|
||||
@@ -241,6 +239,7 @@ namespace MediaBrowser.Controller.Net
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user