| 3110 | } th_http_stop_watchdog_t; |
| 3111 | |
| 3112 | static void *th_http_stop_watchdog(void *opaque) { |
| 3113 | th_http_stop_watchdog_t *watchdog = opaque; |
| 3114 | /* Hang detector, not a latency assertion: sized for the slowest |
| 3115 | * sanitizer/loaded-runner tail (see AGENTS.md, CI determinism). */ |
| 3116 | for (int elapsed_ms = 0; elapsed_ms < 10000; elapsed_ms += 10) { |
| 3117 | if (atomic_load(&watchdog->stop_finished) || |
| 3118 | (watchdog->operation_finished && atomic_load(watchdog->operation_finished))) |
| 3119 | return NULL; |
| 3120 | cbm_usleep(10 * 1000); |
| 3121 | } |
| 3122 | atomic_store(&watchdog->watchdog_fired, 1); |
| 3123 | (void)th_sock_shutdown(watchdog->socket); |
| 3124 | return NULL; |
| 3125 | } |
| 3126 | |
| 3127 | typedef struct { |
| 3128 | cbm_httpd_t *listener; |
nothing calls this directly
no outgoing calls
no test coverage detected