Skip to content

Commit

Permalink
add debug for keepalive_close_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoweibin committed Nov 5, 2011
1 parent c35c14d commit 16afb09
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ngx_http_upstream_keepalive_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,20 @@ ngx_http_upstream_keepalive_close_handler(ngx_event_t *ev)
item = c->data;
conf = item->conf;

#if (NGX_DEBUG)
u_char buffer[64], n, i;

n = c->recv(c, buffer, 64);

if (n > 0) {
for (i = 0; i < n; i++) {
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ev->log, 0,
"keepalive close handler, dump: %02Xd", buffer[i]);
}
}

#endif

ngx_queue_remove(&item->queue);
ngx_close_connection(item->connection);
ngx_queue_insert_head(&conf->free, &item->queue);
Expand Down

0 comments on commit 16afb09

Please sign in to comment.