From 91d4cd1e75ef626c0f985bf172a985ca1c439a51 Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Mon, 20 Nov 2023 01:34:47 +0400 Subject: [PATCH] Fix of WebSocket close status frame --- source/NetCoreServer/NetCoreServer.csproj | 2 +- source/NetCoreServer/WsClient.cs | 2 +- source/NetCoreServer/WsSession.cs | 2 +- source/NetCoreServer/WssClient.cs | 2 +- source/NetCoreServer/WssSession.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/NetCoreServer/NetCoreServer.csproj b/source/NetCoreServer/NetCoreServer.csproj index 7c0c40d..9a887a4 100644 --- a/source/NetCoreServer/NetCoreServer.csproj +++ b/source/NetCoreServer/NetCoreServer.csproj @@ -2,7 +2,7 @@ net8.0 - 8.0.2.0 + 8.0.3.0 Ivan Shynkarenka Copyright (c) 2019-2023 Ivan Shynkarenka https://github.com/chronoxor/NetCoreServer diff --git a/source/NetCoreServer/WsClient.cs b/source/NetCoreServer/WsClient.cs index 844651b..1250ed1 100644 --- a/source/NetCoreServer/WsClient.cs +++ b/source/NetCoreServer/WsClient.cs @@ -390,7 +390,7 @@ public virtual void OnWsConnected(HttpRequest request) {} public virtual void OnWsDisconnecting() {} public virtual void OnWsDisconnected() {} public virtual void OnWsReceived(byte[] buffer, long offset, long size) {} - public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { CloseAsync(status); } + public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { CloseAsync(); } public virtual void OnWsPing(byte[] buffer, long offset, long size) { SendPongAsync(buffer, offset, size); } public virtual void OnWsPong(byte[] buffer, long offset, long size) {} public virtual void OnWsError(string error) { OnError(SocketError.SocketError); } diff --git a/source/NetCoreServer/WsSession.cs b/source/NetCoreServer/WsSession.cs index ae56b58..f407b60 100644 --- a/source/NetCoreServer/WsSession.cs +++ b/source/NetCoreServer/WsSession.cs @@ -340,7 +340,7 @@ public virtual void OnWsConnected(HttpRequest request) {} public virtual void OnWsDisconnecting() {} public virtual void OnWsDisconnected() {} public virtual void OnWsReceived(byte[] buffer, long offset, long size) {} - public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { Close(status); } + public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { Close(); } public virtual void OnWsPing(byte[] buffer, long offset, long size) { SendPongAsync(buffer, offset, size); } public virtual void OnWsPong(byte[] buffer, long offset, long size) {} public virtual void OnWsError(string error) { OnError(SocketError.SocketError); } diff --git a/source/NetCoreServer/WssClient.cs b/source/NetCoreServer/WssClient.cs index 9e6f4d1..f88c42a 100644 --- a/source/NetCoreServer/WssClient.cs +++ b/source/NetCoreServer/WssClient.cs @@ -394,7 +394,7 @@ public virtual void OnWsConnected(HttpRequest request) {} public virtual void OnWsDisconnecting() {} public virtual void OnWsDisconnected() {} public virtual void OnWsReceived(byte[] buffer, long offset, long size) {} - public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { CloseAsync(status); } + public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { CloseAsync(); } public virtual void OnWsPing(byte[] buffer, long offset, long size) { SendPongAsync(buffer, offset, size); } public virtual void OnWsPong(byte[] buffer, long offset, long size) {} public virtual void OnWsError(string error) { OnError(SocketError.SocketError); } diff --git a/source/NetCoreServer/WssSession.cs b/source/NetCoreServer/WssSession.cs index 3312d19..b3b31de 100644 --- a/source/NetCoreServer/WssSession.cs +++ b/source/NetCoreServer/WssSession.cs @@ -340,7 +340,7 @@ public virtual void OnWsConnected(HttpRequest request) {} public virtual void OnWsDisconnecting() {} public virtual void OnWsDisconnected() {} public virtual void OnWsReceived(byte[] buffer, long offset, long size) {} - public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { Close(status); } + public virtual void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) { Close(); } public virtual void OnWsPing(byte[] buffer, long offset, long size) { SendPongAsync(buffer, offset, size); } public virtual void OnWsPong(byte[] buffer, long offset, long size) {} public virtual void OnWsError(string error) { OnError(SocketError.SocketError); }