Merge "Close connection after each failed connect attempt"