From bd6e81eb188ce3dae8eedca12a5dd57b1fc015d7 Mon Sep 17 00:00:00 2001 From: AlianBlank Date: Sat, 6 Jul 2024 18:35:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]1.=20=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GameFrameX.NetWork/BaseNetWorkChannel.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/GameFrameX.NetWork/BaseNetWorkChannel.cs b/GameFrameX.NetWork/BaseNetWorkChannel.cs index 2c4db8bc..9865ea63 100644 --- a/GameFrameX.NetWork/BaseNetWorkChannel.cs +++ b/GameFrameX.NetWork/BaseNetWorkChannel.cs @@ -73,12 +73,9 @@ public virtual async Task WriteAsync(IMessage messageObject, int uniId = 0, int var messageData = _messageEncoder.Handler(messageObject); - if (IsWebSocket) + if (IsWebSocket && AppSession is WebSocketSession webSocketSession) { - if (AppSession is WebSocketSession webSocketSession) - { - await webSocketSession.SendAsync(messageData); - } + await webSocketSession.SendAsync(messageData); } else {