aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest thomas@aei.ca <root@sinnms01.180solutions.com> 2009-03-19 13:59:43 -0700
committerGravatar Thomas Guyot-Sionnest thomas@aei.ca <root@sinnms01.180solutions.com> 2009-03-19 13:59:43 -0700
commit3dd27fb0637cb13c9de09b976765f7a2ba770ac7 (patch)
treee350d07c3b308ff4ff79541d45148be3fcacdbb4 /plugins/check_http.c
parent37e432ec776cda34e0e410fe5c75eb3b4871f74c (diff)
downloadmonitoring-plugins-3dd27fb0637cb13c9de09b976765f7a2ba770ac7.tar.gz
Fixed check_http not timing-out on redirects
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 2f2460c6..72d0a2b6 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -894,9 +894,6 @@ check_http (void)
#endif
if (sd) close(sd);
- /* reset the alarm */
- alarm (0);
-
/* Save check time */
microsec = deltime (tv);
elapsed_time = (double)microsec / 1.0e6;
@@ -999,6 +996,9 @@ check_http (void)
} /* end else (server_expect_yn) */
+ /* reset the alarm - must be called *after* redir or we'll never die on redirects! */
+ alarm (0);
+
if (maximum_age >= 0) {
result = max_state_alt(check_document_dates(header, &msg), result);
}