[monitoring-plugins] Update check_tcp.c

gcoxmoz git at monitoring-plugins.org
Fri Oct 2 20:00:12 CEST 2015


 Module: monitoring-plugins
 Branch: master
 Commit: a3f0b96f32b9553bcf5e33b18e4637bfc6a12465
 Author: gcoxmoz <gcox at mozilla.com>
   Date: Sat May 17 00:55:40 2014 -0400
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=a3f0b96

Update check_tcp.c

Return the state asked for, if connection failed.

---

 plugins/check_tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 2714961..0a6e2b2 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -238,7 +238,7 @@ main (int argc, char **argv)
 	gettimeofday (&tv, NULL);
 
 	result = np_net_connect (server_address, server_port, &sd, PROTOCOL);
-	if (result == STATE_CRITICAL) return STATE_CRITICAL;
+	if (result == STATE_CRITICAL) return econn_refuse_state;
 
 #ifdef HAVE_SSL
 	if (flags & FLAG_SSL){



More information about the Commits mailing list