From 9b9a5931e8d37a899205487e9d3457efc03f526e Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sat, 14 Feb 2009 08:51:15 +0100 Subject: [PATCH] Do not try both http and https against the server This patch changes the tryRapi function so that if the http request succeeded, we don't try https too. --- src/Rapi.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Rapi.hs b/src/Rapi.hs index 79015a0e4..3405e3688 100644 --- a/src/Rapi.hs +++ b/src/Rapi.hs @@ -103,10 +103,9 @@ tryRapi :: String -> String -> IO (Either String String) tryRapi url1 url2 = do body1 <- getUrl url1 - body2 <- getUrl url2 - return (case body1 of - Left _ -> body2 - Right _ -> body1) + (case body1 of + Left _ -> getUrl url2 + Right _ -> return body1) getInstances :: String -> IO (Either String String) getInstances master = -- GitLab