1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

http: client: defer HUP if pending buflist

This commit is contained in:
Andy Green 2021-01-26 08:04:16 +00:00
parent 6497220e87
commit 3eeda84a8d

View file

@ -359,10 +359,14 @@ client_http_body_sent:
if ((pollfd->revents & (LWS_POLLIN | LWS_POLLHUP)) ==
LWS_POLLHUP) {
lwsl_debug("Server conn %s (fd=%d) dead\n",
lws_wsi_tag(wsi), pollfd->fd);
cce = "Peer hung up";
goto bail3;
if (lws_buflist_total_len(&wsi->buflist))
lws_set_timeout(wsi, PENDING_TIMEOUT_CLOSE_ACK, 3);
else {
lwsl_debug("Server conn %s (fd=%d) dead\n",
lws_wsi_tag(wsi), pollfd->fd);
cce = "Peer hung up";
goto bail3;
}
}
if (pollfd->revents & LWS_POLLOUT)