summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-05-09 03:22:55 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-05-09 03:22:55 (GMT)
commit1c823d7969501c7c89f2ae765e40265518d8a731 (patch)
tree6ff5b5eb58272c03172ff14c9608ede93492b44a /plugins
parent3bae38aef895b93b29836c2f15c9dfd388562e11 (diff)
downloadmonitoring-plugins-1c823d7969501c7c89f2ae765e40265518d8a731.tar.gz
fix error when server closes connection
immediately git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@503 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_http.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index e22560e..91cc48c 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -630,16 +630,21 @@ check_http (void)
630 pagesize += i; 630 pagesize += i;
631 } 631 }
632 632
633 if (i < 0) { 633 if (i < 0 && errno != ECONNRESET) {
634#ifdef HAVE_SSL 634#ifdef HAVE_SSL
635 sslerr=SSL_get_error(ssl, i); 635 if (use_ssl) {
636 if ( sslerr == SSL_ERROR_SSL ) { 636 sslerr=SSL_get_error(ssl, i);
637 terminate (STATE_WARNING, "Client Certificate Required\n"); 637 if ( sslerr == SSL_ERROR_SSL ) {
638 } else { 638 terminate (STATE_WARNING, "Client Certificate Required\n");
639 } else {
640 terminate (STATE_CRITICAL, "Error in recv()");
641 }
642 }
643 else {
644#endif
639 terminate (STATE_CRITICAL, "Error in recv()"); 645 terminate (STATE_CRITICAL, "Error in recv()");
646#ifdef HAVE_SSL
640 } 647 }
641#else
642 terminate (STATE_CRITICAL, "Error in recv()");
643#endif 648#endif
644 } 649 }
645 650