summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-05-09 03:22:37 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-05-09 03:22:37 (GMT)
commit89167cba185d1e7831cc8518e235ceb019ca5f7c (patch)
tree4d5f0a463ee99816dd11af70026c4728dd34431a
parentcea584f3f2038bb97c9210e6d9a6c85023b9f001 (diff)
downloadmonitoring-plugins-89167cba185d1e7831cc8518e235ceb019ca5f7c.tar.gz
fix error when server closes connection immediately
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/release-1.3.0@502 f882894a-f735-0410-b71e-b25c423dba1c
-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 d13050a..c0c2b41 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -627,16 +627,21 @@ check_http (void)
627 pagesize += i; 627 pagesize += i;
628 } 628 }
629 629
630 if (i < 0) { 630 if (i < 0 && errno != ECONNRESET) {
631#ifdef HAVE_SSL 631#ifdef HAVE_SSL
632 sslerr=SSL_get_error(ssl, i); 632 if (use_ssl) {
633 if ( sslerr == SSL_ERROR_SSL ) { 633 sslerr=SSL_get_error(ssl, i);
634 terminate (STATE_WARNING, "Client Certificate Required\n"); 634 if ( sslerr == SSL_ERROR_SSL ) {
635 } else { 635 terminate (STATE_WARNING, "Client Certificate Required\n");
636 } else {
637 terminate (STATE_CRITICAL, "Error in recv()");
638 }
639 }
640 else {
641#endif
636 terminate (STATE_CRITICAL, "Error in recv()"); 642 terminate (STATE_CRITICAL, "Error in recv()");
643#ifdef HAVE_SSL
637 } 644 }
638#else
639 terminate (STATE_CRITICAL, "Error in recv()");
640#endif 645#endif
641 } 646 }
642 647