This change avoids waiting for UDP checks if the TCP reachability check has already failed. For example, if the port is closed, the TCP connection should fail immediately, but the UDP checks might wait for the full timeout.
This change also updates the error type checking to modern Go style.
This change avoids waiting for UDP checks if the TCP reachability check has already failed. For example, if the port is closed, the TCP connection should fail immediately, but the UDP checks might wait for the full timeout.
This change also updates the error type checking to modern Go style.