TRQ-1830. When attempting to connect in a retry loop, don't continue to retry if there is a permanent type failure such as ECONNREFUSED.