From 907a752600a4949bb2a8dd692241858c01be5e05 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 29 May 2021 18:43:23 +1000 Subject: [PATCH] Web: Fix disconnect message almost never showing now --- src/Platform_Web.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platform_Web.c b/src/Platform_Web.c index bc91a0ed3..cdbf53ac3 100644 --- a/src/Platform_Web.c +++ b/src/Platform_Web.c @@ -303,7 +303,7 @@ cc_result Socket_Read(cc_socket s, cc_uint8* data, cc_uint32 count, cc_uint32* m /* recv only reads one WebSocket frame at most, hence call it multiple times */ int res; *modified = 0; - while (count) { + while (count && interop_SocketGetPending(s) > 0) { /* returned result is negative for error */ res = interop_SocketRecv(s, data, count);