|
@@ -90,7 +90,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler |
|
|
// var channel = _managerTcpClients.FirstOrDefault(x => x.Key.Equals(imei)).Value; |
|
|
// var channel = _managerTcpClients.FirstOrDefault(x => x.Key.Equals(imei)).Value; |
|
|
//await channel.CloseAsync(); |
|
|
//await channel.CloseAsync(); |
|
|
await context.Channel.CloseAsync(); |
|
|
await context.Channel.CloseAsync(); |
|
|
_logger.LogInformation($"3分钟超时无数据,主动断链"); |
|
|
|
|
|
|
|
|
_logger.LogInformation($"3分钟超时无数据,主动断链:{context.Channel}"); |
|
|
// 执行任务逻辑 |
|
|
// 执行任务逻辑 |
|
|
}, |
|
|
}, |
|
|
#if DEBUG |
|
|
#if DEBUG |
|
@@ -107,7 +107,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler |
|
|
return context.Channel.EventLoop.Schedule(async () => |
|
|
return context.Channel.EventLoop.Schedule(async () => |
|
|
{ |
|
|
{ |
|
|
await context.Channel.CloseAsync(); |
|
|
await context.Channel.CloseAsync(); |
|
|
_logger.LogInformation($"3分钟超时无数据,主动断链"); |
|
|
|
|
|
|
|
|
_logger.LogInformation($"3分钟超时无数据,主动断链:{context.Channel}"); |
|
|
// 执行任务逻辑 |
|
|
// 执行任务逻辑 |
|
|
}, |
|
|
}, |
|
|
#if DEBUG |
|
|
#if DEBUG |
|
|