From 7f838d1af025c97b163e6c2a5201b6ab40cccc17 Mon Sep 17 00:00:00 2001 From: H Vs Date: Thu, 29 Feb 2024 11:44:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TcpServer/Handler/ProtocolHandler.cs | 1 + .../TcpServer/Handler/RegisterHandler.cs | 4 ++-- NearCardAttendance.TcpServer/Server.cs | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs b/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs index c6ee315..a0ddfe9 100644 --- a/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs +++ b/NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs @@ -19,6 +19,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler public override async void ChannelActive(IChannelHandlerContext context) { + await Task.CompletedTask; // Handle channel active event } diff --git a/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs b/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs index ce0a3eb..7f36ced 100644 --- a/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs +++ b/NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs @@ -25,7 +25,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler { private readonly ILogger _logger; private readonly HttpHelper _httpHelper = default!; - private readonly IDisposable _loggerScope = default!; + //private readonly IDisposable _loggerScope = default!; private readonly ServiceConfig _configService; private readonly GpsCardAccessorClient _deviceConfigApiClient; @@ -49,7 +49,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler { try { - + await Task.CompletedTask; } catch (Exception ex) { diff --git a/NearCardAttendance.TcpServer/Server.cs b/NearCardAttendance.TcpServer/Server.cs index 62731ee..3e316b7 100644 --- a/NearCardAttendance.TcpServer/Server.cs +++ b/NearCardAttendance.TcpServer/Server.cs @@ -14,9 +14,9 @@ namespace NearCardAttendance.TcpServer public class Server : BackgroundService { private readonly ILogger _logger; - private readonly IServiceProvider _serviceProvider; + //private readonly IServiceProvider _serviceProvider; private readonly ServerBootstrap _serverBootstrap; - private IChannel _serverChannel = default!; + // private IChannel _serverChannel = default!; private CancellationTokenSource _tokenSource = null!; @@ -26,7 +26,7 @@ namespace NearCardAttendance.TcpServer IServiceProvider serviceProvider) { _logger = logger; - _serviceProvider = serviceProvider; + //_serviceProvider = serviceProvider; _serverBootstrap = serverBootstrap; }