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)