<p><a href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1062" class="issue-link" title="check_tcp shows no output when changing desired exit state [sf#3538991]">#1062</a><br>
A simple little patch to return an accurate statement ("Connection refused") along with the desired return code when asked to do so.</p>

<p>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.</p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/gcoxmoz/monitoring-plugins master</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1257'>https://github.com/monitoring-plugins/monitoring-plugins/pull/1257</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Update check_tcp.c</li>
  <li>Update netutils.c</li>
  <li>Patch against issue 1062</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1257/files#diff-0">plugins/check_tcp.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1257/files#diff-1">plugins/netutils.c</a>
    (12)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1257.patch'>https://github.com/monitoring-plugins/monitoring-plugins/pull/1257.patch</a></li>
  <li><a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1257.diff'>https://github.com/monitoring-plugins/monitoring-plugins/pull/1257.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1257'>Reply to this email on GitHub</a>.<img src='https://github.com/notifications/beacon/5514713__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNTkyMzI5NiwiZGF0YSI6eyJpZCI6MzI0NjAyMTF9fQ==--79d65f42e2d1337fcd44c9cb183fbcf3809f9eb4.gif' height='1' width='1'></p>