Ver a proveniência

优化一下,新增一些状态

master
waterliu99 há 1 ano
ascendente
cometimento
9e3b6d3d9f
2 ficheiros alterados com 12 adições e 2 eliminações
  1. +1
    -1
      global.json
  2. +11
    -1
      src/JT808.Gateway/JT808TcpServer.cs

+ 1
- 1
global.json Ver ficheiro

@@ -1,5 +1,5 @@
{
"sdk": {
"version": "7.0.203"
"version": "7.0.306"
}
}

+ 11
- 1
src/JT808.Gateway/JT808TcpServer.cs Ver ficheiro

@@ -120,6 +120,11 @@ namespace JT808.Gateway
}
catch (OperationCanceledException)
{
break;
}
catch (ObjectDisposedException)
{
break;
}
catch (Exception)
{
@@ -310,8 +315,13 @@ namespace JT808.Gateway
{
Logger.LogInformation("JT808 Tcp Server Stop");
if (server?.Connected ?? false)
server.Shutdown(SocketShutdown.Both);
server.Shutdown(SocketShutdown.Receive);
server?.Close();
server?.Dispose();
foreach (var item in SessionManager.Sessions)
{
item.Value.Client.Close();
}
return Task.CompletedTask;
}
}


Carregando…
Cancelar
Guardar