diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-05-09 03:22:55 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-05-09 03:22:55 +0000 |
commit | 1c823d7969501c7c89f2ae765e40265518d8a731 (patch) | |
tree | 6ff5b5eb58272c03172ff14c9608ede93492b44a | |
parent | 3bae38aef895b93b29836c2f15c9dfd388562e11 (diff) | |
download | monitoring-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
-rw-r--r-- | plugins/check_http.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index e22560e2..91cc48cd 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -630,16 +630,21 @@ check_http (void) pagesize += i; } - if (i < 0) { + if (i < 0 && errno != ECONNRESET) { #ifdef HAVE_SSL - sslerr=SSL_get_error(ssl, i); - if ( sslerr == SSL_ERROR_SSL ) { - terminate (STATE_WARNING, "Client Certificate Required\n"); - } else { + if (use_ssl) { + sslerr=SSL_get_error(ssl, i); + if ( sslerr == SSL_ERROR_SSL ) { + terminate (STATE_WARNING, "Client Certificate Required\n"); + } else { + terminate (STATE_CRITICAL, "Error in recv()"); + } + } + else { +#endif terminate (STATE_CRITICAL, "Error in recv()"); +#ifdef HAVE_SSL } -#else - terminate (STATE_CRITICAL, "Error in recv()"); #endif } |