From eaf50c62a9d2fa811ad244af8e3aedddf3feb297 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 10 Feb 2025 22:11:12 +0000 Subject: [PATCH] removed unused method and field --- .../Ws/SptWebSocketConnectionHandler.cs | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/Libraries/Core/Servers/Ws/SptWebSocketConnectionHandler.cs b/Libraries/Core/Servers/Ws/SptWebSocketConnectionHandler.cs index 9d9748a4..4f595c92 100644 --- a/Libraries/Core/Servers/Ws/SptWebSocketConnectionHandler.cs +++ b/Libraries/Core/Servers/Ws/SptWebSocketConnectionHandler.cs @@ -23,7 +23,6 @@ public class SptWebSocketConnectionHandler( ) : IWebSocketConnectionHandler { protected WsPing _defaultNotification = new(); - protected HttpConfig _httpConfig = _configServer.GetConfig(); protected Lock _lockObject = new(); protected Dictionary _receiveTasks = new(); protected Dictionary _socketAliveTimers = new(); @@ -130,25 +129,6 @@ public class SptWebSocketConnectionHandler( return _sockets.TryGetValue(sessionID, out var socket) && socket.State == WebSocketState.Open; } - private void TimedTask(WebSocket ws, string sessionID) - { - if (_logger.IsLogEnabled(LogLevel.Debug)) - { - _logger.Debug(_localisationService.GetText("websocket-pinging_player", sessionID)); - } - - if (ws.State == WebSocketState.Open) - { - var sendTask = ws.SendAsync( - Encoding.UTF8.GetBytes(_jsonUtil.Serialize(_defaultNotification)), - WebSocketMessageType.Text, - true, - CancellationToken.None - ); - sendTask.Wait(); - } - } - private void ReceiveTask(string sessionID, WebSocket ws, CancellationToken cancelToken) { List readBytes = new();