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

server.c: test **truncated_send_len** for partial

Testing against truncated_send_malloc won't work if we've already
buffered and completed a partial buffer, as truncated_send_malloc
isn't free'd until the socket is destroyed.
This commit is contained in:
Andrew Canaday 2014-08-23 21:45:12 -04:00
parent f012f751aa
commit 8301570967

View file

@ -572,7 +572,7 @@ int lws_server_socket_service(struct libwebsocket_context *context,
/* pending truncated sends have uber priority */
if (wsi->truncated_send_malloc) {
if (wsi->truncated_send_len) {
if (pollfd->revents & LWS_POLLOUT)
if (lws_issue_raw(wsi, wsi->truncated_send_malloc +
wsi->truncated_send_offset,