From bd5219843324361207f3e51eba66375540713d15 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 6 Dec 2015 20:10:27 +0100 Subject: [PATCH] Changes in Control.Retry --- Telegram.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram.hs b/Telegram.hs index ec795a8..8723702 100644 --- a/Telegram.hs +++ b/Telegram.hs @@ -3,6 +3,7 @@ module Telegram where import Network import System.IO import System.Process +import Data.Monoid import Data.List.Utils (replace) import Control.Monad (when, replicateM_) import Control.Retry @@ -21,7 +22,7 @@ telegramProcess = do telegramSocket :: IO Handle -telegramSocket = recoverAll timeout connect +telegramSocket = recoverAll timeout (const connect) where connect = connectTo host (PortNumber port) timeout = fibonacciBackoff 100000 <> limitRetries 5 @@ -68,4 +69,4 @@ message :: Arg -> Arg -> Command message = mkCommand "msg" nothing :: Command -nothing = "help" \ No newline at end of file +nothing = "help"