| 2767 | } |
| 2768 | |
| 2769 | static void |
| 2770 | idle_connection(ClientData client_data, struct timeval *nowP __attribute__((unused))) |
| 2771 | { |
| 2772 | int cnum; |
| 2773 | struct timeval tv; |
| 2774 | char strTime[32]; |
| 2775 | struct tm localtv; |
| 2776 | gettimeofday(&tv, NULL); |
| 2777 | strftime(strTime, 32, "%T", localtime_r(&tv.tv_sec, &localtv)); |
| 2778 | |
| 2779 | cnum = client_data.i; |
| 2780 | connections[cnum].idle_timer = (Timer *)0; |
| 2781 | if (unique_id) { |
| 2782 | (void)fprintf(stderr, "[%s.%lld] %s: timed out (%d sec) in state %d, requests %d, unique id: %u\n", strTime, |
| 2783 | (long long)tv.tv_usec, urls[connections[cnum].url_num].url_str, idle_secs, connections[cnum].conn_state, |
| 2784 | connections[cnum].stats.requests_per_connection, connections[cnum].unique_id); |
| 2785 | } else { |
| 2786 | (void)fprintf(stderr, "[%s.%lld] %s: timed out (%d sec) in state %d, requests %d\n", strTime, (long long)tv.tv_usec, |
| 2787 | urls[connections[cnum].url_num].url_str, idle_secs, connections[cnum].conn_state, |
| 2788 | connections[cnum].stats.requests_per_connection); |
| 2789 | } |
| 2790 | connections[cnum].reusable = 0; |
| 2791 | close_connection(cnum); |
| 2792 | ++total_timeouts; |
| 2793 | } |
| 2794 | |
| 2795 | static void |
| 2796 | wakeup_connection(ClientData client_data, struct timeval *nowP __attribute__((unused))) |
nothing calls this directly
no test coverage detected