mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
Attempt to fix server problems receiving large https POSTS.
Without this change the pending list ends up having wsi->pending_read_list_next == wsi, which causes a loop in lws_plat_unix().
This commit is contained in:
parent
79d09fcc37
commit
b9f28ac8df
1 changed files with 8 additions and 6 deletions
14
lib/ssl.c
14
lib/ssl.c
|
@ -444,12 +444,14 @@ lws_ssl_capable_read(struct libwebsocket_context *context,
|
|||
*/
|
||||
if (n == len && wsi->ssl && SSL_pending(wsi->ssl)) {
|
||||
if (!wsi->pending_read_list_next && !wsi->pending_read_list_prev) {
|
||||
/* add us to the linked list of guys with pending ssl */
|
||||
if (context->pending_read_list)
|
||||
context->pending_read_list->pending_read_list_prev = wsi;
|
||||
wsi->pending_read_list_next = context->pending_read_list;
|
||||
wsi->pending_read_list_prev = NULL;
|
||||
context->pending_read_list = wsi;
|
||||
if (context->pending_read_list != wsi) {
|
||||
/* add us to the linked list of guys with pending ssl */
|
||||
if (context->pending_read_list)
|
||||
context->pending_read_list->pending_read_list_prev = wsi;
|
||||
wsi->pending_read_list_next = context->pending_read_list;
|
||||
wsi->pending_read_list_prev = NULL;
|
||||
context->pending_read_list = wsi;
|
||||
}
|
||||
}
|
||||
} else
|
||||
lws_ssl_remove_wsi_from_buffered_list(context, wsi);
|
||||
|
|
Loading…
Add table
Reference in a new issue