Skip to content

Commit

Permalink
lib-http: Fixed checking if istream or ostream needs waiting.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed May 18, 2016
1 parent 7420207 commit 43f6515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib-http/http-client-request.c
Expand Up @@ -856,7 +856,7 @@ int http_client_request_send_more(struct http_client_request *req,
/* finished sending payload */
http_client_request_finish_payload_out(req);
}
} else if (i_stream_get_data_size(req->payload_input) > 0) {
} else if (i_stream_have_bytes_left(req->payload_input)) {
/* output is blocking (server needs to act; enable timeout) */
conn->output_locked = TRUE;
if (!pipelined)
Expand Down
2 changes: 1 addition & 1 deletion src/lib-http/http-server-response.c
Expand Up @@ -526,7 +526,7 @@ int http_server_response_send_more(struct http_server_response *resp,
}
/* finished sending payload */
http_server_response_finish_payload_out(resp);
} else if (i_stream_get_data_size(resp->payload_input) > 0) {
} else if (i_stream_have_bytes_left(resp->payload_input)) {
/* output is blocking */
conn->output_locked = TRUE;
o_stream_set_flush_pending(output, TRUE);
Expand Down

0 comments on commit 43f6515

Please sign in to comment.