https://github.com/monitoring-plugins/monitoring-plugins/issues/1062 A simple little patch to return an accurate statement ("Connection refused") along with the desired return code when asked to do so.
The global exit code is being passed around as a functional return code, and so the state of the actual connection function is being lost/interpolated badly upstream. You can merge this Pull Request by running: git pull https://github.com/gcoxmoz/monitoring-plugins master Or you can view, comment on it, or merge it online at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1257 -- Commit Summary -- * Update check_tcp.c * Update netutils.c * Patch against issue 1062 -- File Changes -- M plugins/check_tcp.c (2) M plugins/netutils.c (12) -- Patch Links -- https://github.com/monitoring-plugins/monitoring-plugins/pull/1257.patch https://github.com/monitoring-plugins/monitoring-plugins/pull/1257.diff -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1257
