Просмотр исходного кода

don't issue http requests when checking cert only

Andreas Piesk 8 лет назад
Родитель
Сommit
a61eed6701
1 измененных файлов с 4 добавлено и 6 удалено
  1. 4 6
      plugins/check_http.c

+ 4 - 6
plugins/check_http.c

@@ -1025,12 +1025,10 @@ check_http (void)
     microsec_ssl = deltime (tv_temp);
     elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
     if (check_cert == TRUE) {
-			result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
-			if (result != STATE_OK) {
-				np_net_ssl_cleanup();
-				if (sd) close(sd);
-				return result;
-			}
+      result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
+      np_net_ssl_cleanup();
+      if (sd) close(sd);
+      return result;
     }
   }
 #endif /* HAVE_SSL */