hwall-auth-iitk 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+13/−2 lines, 2 files
Files
- hwall-auth-iitk.cabal +1/−1
- src/Main.hs +12/−1
hwall-auth-iitk.cabal view
@@ -1,5 +1,5 @@ name: hwall-auth-iitk-version: 0.1.0.0+version: 0.1.0.1 synopsis: Initial version of firewall Authentication for IITK network. description: Firewall Authentication script for IITK network in haskell. license: BSD3
src/Main.hs view
@@ -110,7 +110,18 @@ putStrLn "Performing operation depending on current status." either (alreadyLogged auth) (tryToLog auth) loggedin ++retryIfFailed :: IO () -> IO ()+retryIfFailed action = action `catch` with+ where+ with :: HttpException -> IO ()+ with except = do+ putStrLn $ "Exception: " ++ show except+ putStrLn $ "Retrying in 30 seconds"+ threadDelay 30000000 -- Wait 200 seconds+ retryIfFailed action+ main :: IO () main = do auth <- getAuthenticationInfo -- Getting Username and password- firewallAuth auth+ retryIfFailed (firewallAuth auth)