From 7fe49f54ff9c44b89a5b4124adba6f2dbcb9afa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Wed, 15 May 2024 09:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=B6=88=E8=B4=B9=E5=A4=A7?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E4=B8=AD=E9=81=87=E5=88=B0OperationCanceledE?= =?UTF-8?q?xception=E6=97=B6=EF=BC=8C=E4=B8=8D=E8=A6=81=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=97=A5=E5=BF=97=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?StarServer=E9=80=80=E5=87=BA=E6=97=B6=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Stardust.Server/Controllers/AppController.cs | 1 + Stardust.Server/Controllers/NodeController.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Stardust.Server/Controllers/AppController.cs b/Stardust.Server/Controllers/AppController.cs index 40bbb1dc..ab26e1ef 100644 --- a/Stardust.Server/Controllers/AppController.cs +++ b/Stardust.Server/Controllers/AppController.cs @@ -227,6 +227,7 @@ private async Task ConsumeMessage(WebSocket socket, App app, String clientId, St } } catch (TaskCanceledException) { } + catch (OperationCanceledException) { } catch (Exception ex) { XTrace.WriteLine("WebSocket异常 app={0} ip={1}", app, ip); diff --git a/Stardust.Server/Controllers/NodeController.cs b/Stardust.Server/Controllers/NodeController.cs index 28cf6e1d..5a65ff33 100644 --- a/Stardust.Server/Controllers/NodeController.cs +++ b/Stardust.Server/Controllers/NodeController.cs @@ -380,6 +380,7 @@ private async Task ConsumeMessage(WebSocket socket, Node node, String ip, Cancel } } catch (TaskCanceledException) { } + catch (OperationCanceledException) { } catch (Exception ex) { XTrace.WriteLine("WebSocket异常 node={0} ip={1}", node, ip);