From 30599aa76aadb14efd2b25fa172f17414b60eb18 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 8 Feb 2020 16:56:10 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/ResponseStream.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/websocket-sharp/Net/ResponseStream.cs b/websocket-sharp/Net/ResponseStream.cs index 96f1aeb3..1fcb37ac 100644 --- a/websocket-sharp/Net/ResponseStream.cs +++ b/websocket-sharp/Net/ResponseStream.cs @@ -179,15 +179,15 @@ namespace WebSocketSharp.Net } } - if (closing) { - if (_sendChunked) - _write (_lastChunk, 0, 5); - - _body = null; - } - else { + if (!closing) { _body = new MemoryStream (); + return; } + + if (_sendChunked) + _write (_lastChunk, 0, 5); + + _body = null; } private bool flushHeaders (bool closing)