From 123572a9215971b1c03a0498a89f5493527ce491 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@warmcat.com>
Date: Tue, 18 Apr 2017 15:18:56 +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 d1d84898..2918dee5 100644
--- a/lib/lws-plat-win.c
+++ b/lib/lws-plat-win.c
@@ -106,6 +106,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;
}
--
GitLab