Explorar el Código

服务器关闭时,主动把所有socket链接关闭

master
waterliu99 hace 1 año
padre
commit
c4f8f1cc90
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      src/JT808.Gateway/JT808TcpServer.cs

+ 1
- 1
src/JT808.Gateway/JT808TcpServer.cs Ver fichero

@@ -315,7 +315,7 @@ namespace JT808.Gateway
{
Logger.LogInformation("JT808 Tcp Server Stop");
if (server?.Connected ?? false)
server.Shutdown(SocketShutdown.Receive);
server.Shutdown(SocketShutdown.Both);
server?.Close();
server?.Dispose();
foreach (var item in SessionManager.Sessions)


||||||
x
 
000:0
Cargando…
Cancelar
Guardar