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 committed by Andy Green
parent f012f751aa
commit af8db35010

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,