Skip to content
代码片段 群组 项目
提交 8d407988 编辑于 作者: Lonny Wong's avatar Lonny Wong 提交者: Andy Green
浏览文件

pmd: revert #3014 and drain extensions before next ssl read

上级 cd6ce195
No related branches found
No related tags found
无相关合并请求
......@@ -723,7 +723,7 @@ utf8_fail:
}
#if !defined(LWS_WITHOUT_EXTENSIONS)
if (!lin && !(already_processed & ALREADY_PROCESSED_FULL_DRAINING))
if (!lin)
break;
#endif
......@@ -1223,8 +1223,18 @@ drain:
else
pending = pending > wsi->a.context->pt_serv_buf_size ?
wsi->a.context->pt_serv_buf_size : pending;
if (--sanity)
if (--sanity) {
#if !defined(LWS_WITHOUT_EXTENSIONS)
while (wsi->ws->rx_draining_ext) {
// RX Extension needs to be drained before next read
n = lws_ws_rx_sm(wsi, ALREADY_PROCESSED_IGNORE_CHAR, 0);
if (n < 0) {
return LWS_HPI_RET_PLEASE_CLOSE_ME;
}
}
#endif
goto read;
}
else
/*
* Something has gone wrong, we are spinning...
......
......@@ -75,7 +75,6 @@ enum lws_websocket_opcodes_07 {
#define ALREADY_PROCESSED_IGNORE_CHAR 1
#define ALREADY_PROCESSED_NO_CB 2
#define ALREADY_PROCESSED_FULL_DRAINING 4
#if !defined(LWS_WITHOUT_EXTENSIONS)
struct lws_vhost_role_ws {
......
......@@ -1080,7 +1080,7 @@ lws_parse_ws(struct lws *wsi, unsigned char **buf, size_t len)
wsi->ws->rx_draining_ext);
#endif
m = lws_ws_rx_sm(wsi, ALREADY_PROCESSED_IGNORE_CHAR |
ALREADY_PROCESSED_NO_CB | ALREADY_PROCESSED_FULL_DRAINING, 0);
ALREADY_PROCESSED_NO_CB, 0);
}
if (m < 0) {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册