Changes in Control.Retry

This commit is contained in:
rnhmjoj 2015-12-06 20:10:27 +01:00
parent dab367ea36
commit bd52198433

View File

@ -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"
nothing = "help"