From 3fc87d18ea7a3d10dec54527d9c665fa5a9bac65 Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 17 Mar 2021 21:04:45 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/ChunkStream.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/ChunkStream.cs b/websocket-sharp/Net/ChunkStream.cs index 4cf9c409..8a95b4d8 100644 --- a/websocket-sharp/Net/ChunkStream.cs +++ b/websocket-sharp/Net/ChunkStream.cs @@ -194,8 +194,6 @@ namespace WebSocketSharp.Net if (b != 10) return InputChunkState.None; - _chunkRead = 0; - var val = _saved.ToString (); var s = removeChunkExtension (val); @@ -206,6 +204,8 @@ namespace WebSocketSharp.Net throwProtocolViolation ("The chunk size cannot be parsed."); } + _chunkRead = 0; + if (_chunkSize == 0) { _trailerState = 2;