From ba16f5172c3eaa54459a9528068667a4af10e2e0 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 18 Apr 2017 15:18:14 +0800 Subject: [PATCH] windows: align choked trunc checking with unix --- lib/lws-plat-win.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c index 188f1a94..67c98f4b 100644 --- a/lib/lws-plat-win.c +++ b/lib/lws-plat-win.c @@ -108,6 +108,10 @@ LWS_VISIBLE int lws_get_random(struct lws_context *context, LWS_VISIBLE int lws_send_pipe_choked(struct lws *wsi) { + /* treat the fact we got a truncated send pending as if we're choked */ + if (wsi->trunc_len) + return 1; + return (int)wsi->sock_send_blocking; }