From 2b15728ade3dde55607a0c55b933dad148ac40d5 Mon Sep 17 00:00:00 2001 From: Rakshith Ravi <12864597+rakshith-ravi@users.noreply.github.com> Date: Thu, 15 Nov 2018 13:21:14 +0530 Subject: [PATCH] Allows for zero bytes to be read. Fixes #202 and maybe even #71 --- websocket-sharp/Ext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index bed790ec1..4d8b16ba1 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -756,7 +756,7 @@ internal static void ReadBytesAsync ( return; } - if (nread == 0 || nread == length) { + if (nread == length) { if (completed != null) completed (buff.SubArray (0, offset + nread));