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:
parent
6497220e87
commit
3eeda84a8d
1 changed files with 8 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue