From b5265bceb1e576ba086254d6b77ffd395ea427c4 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 31 Jan 2020 19:39:57 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/ResponseStream.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/websocket-sharp/Net/ResponseStream.cs b/websocket-sharp/Net/ResponseStream.cs index b48d4eec..c424fb41 100644 --- a/websocket-sharp/Net/ResponseStream.cs +++ b/websocket-sharp/Net/ResponseStream.cs @@ -202,7 +202,8 @@ namespace WebSocketSharp.Net private static byte[] getChunkSizeBytes (int size, bool final) { - return Encoding.ASCII.GetBytes (String.Format ("{0:x}\r\n{1}", size, final ? "\r\n" : "")); + var chunkSize = String.Format ("{0:x}\r\n{1}", size, final ? "\r\n" : ""); + return Encoding.ASCII.GetBytes (chunkSize); } private void writeChunked (byte[] buffer, int offset, int count)