From a1b39732d7a76c93386d948a404f3f917835a887 Mon Sep 17 00:00:00 2001 From: David Galeano Date: Thu, 10 Jan 2013 10:06:38 +0800 Subject: [PATCH] Avoid checking choked pipe if no extension has more data to write. --- lib/parsers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/parsers.c b/lib/parsers.c index 0f4c2c7a..a61c0e20 100644 --- a/lib/parsers.c +++ b/lib/parsers.c @@ -1560,6 +1560,11 @@ lws_issue_raw_ext_access(struct libwebsocket *wsi, debug("written %d bytes to client\n", eff_buf.token_len); + /* no extension has more to spill */ + + if (!ret) + break; + /* we used up what we had */ eff_buf.token = NULL;