Przeglądaj źródła

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

master
waterliu99 1 rok temu
rodzic
commit
c4f8f1cc90
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      src/JT808.Gateway/JT808TcpServer.cs

+ 1
- 1
src/JT808.Gateway/JT808TcpServer.cs Wyświetl plik

@@ -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)


Ładowanie…
Anuluj
Zapisz