Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
httpc: add more traces
  • Loading branch information
perexg committed Jan 13, 2015
1 parent 1723e73 commit 0818adf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/httpc.c
Expand Up @@ -205,6 +205,7 @@ static int
http_client_flush( http_client_t *hc, int result )
{
hc->hc_result = result;
tvhtrace("httpc", "%04X: client flush %i", shortid(hc), result);
if (result < 0)
http_client_shutdown(hc, 0, 0);
hc->hc_in_data = 0;
Expand Down Expand Up @@ -907,6 +908,7 @@ http_client_run( http_client_t *hc )
r = http_client_ssl_recv(hc, buf, hc->hc_io_size);
else
r = recv(hc->hc_fd, buf, hc->hc_io_size, MSG_DONTWAIT);
tvhtrace("httpc", "%04X: recv %zi", shortid(hc), r);
if (r == 0) {
if (hc->hc_in_data && !hc->hc_keepalive)
return http_client_finish(hc);
Expand Down Expand Up @@ -1385,6 +1387,7 @@ http_client_close ( http_client_t *hc )
}
http_client_shutdown(hc, 1, 0);
http_client_flush(hc, 0);
tvhtrace("httpc", "%04X: Closed", shortid(hc));
while ((wcmd = TAILQ_FIRST(&hc->hc_wqueue)) != NULL)
http_client_cmd_destroy(hc, wcmd);
http_client_ssl_free(hc);
Expand Down

0 comments on commit 0818adf

Please sign in to comment.