Browse Source

调整

develop
H Vs 9 months ago
parent
commit
7f838d1af0
3 changed files with 6 additions and 5 deletions
  1. +1
    -0
      NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs
  2. +2
    -2
      NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs
  3. +3
    -3
      NearCardAttendance.TcpServer/Server.cs

+ 1
- 0
NearCardAttendance.Service/TcpServer/Handler/ProtocolHandler.cs View File

@@ -19,6 +19,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler


public override async void ChannelActive(IChannelHandlerContext context) public override async void ChannelActive(IChannelHandlerContext context)
{ {
await Task.CompletedTask;
// Handle channel active event // Handle channel active event
} }




+ 2
- 2
NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs View File

@@ -25,7 +25,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler
{ {
private readonly ILogger<RegisterHandler> _logger; private readonly ILogger<RegisterHandler> _logger;
private readonly HttpHelper _httpHelper = default!; private readonly HttpHelper _httpHelper = default!;
private readonly IDisposable _loggerScope = default!;
//private readonly IDisposable _loggerScope = default!;
private readonly ServiceConfig _configService; private readonly ServiceConfig _configService;
private readonly GpsCardAccessorClient<GpsDeviceConfig> _deviceConfigApiClient; private readonly GpsCardAccessorClient<GpsDeviceConfig> _deviceConfigApiClient;


@@ -49,7 +49,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler
{ {
try try
{ {
await Task.CompletedTask;
} }
catch (Exception ex) catch (Exception ex)
{ {


+ 3
- 3
NearCardAttendance.TcpServer/Server.cs View File

@@ -14,9 +14,9 @@ namespace NearCardAttendance.TcpServer
public class Server : BackgroundService public class Server : BackgroundService
{ {
private readonly ILogger<Server> _logger; private readonly ILogger<Server> _logger;
private readonly IServiceProvider _serviceProvider;
//private readonly IServiceProvider _serviceProvider;
private readonly ServerBootstrap _serverBootstrap; private readonly ServerBootstrap _serverBootstrap;
private IChannel _serverChannel = default!;
// private IChannel _serverChannel = default!;
private CancellationTokenSource _tokenSource = null!; private CancellationTokenSource _tokenSource = null!;


@@ -26,7 +26,7 @@ namespace NearCardAttendance.TcpServer
IServiceProvider serviceProvider) IServiceProvider serviceProvider)
{ {
_logger = logger; _logger = logger;
_serviceProvider = serviceProvider;
//_serviceProvider = serviceProvider;
_serverBootstrap = serverBootstrap; _serverBootstrap = serverBootstrap;
} }


Loading…
Cancel
Save