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 Network
import System.IO import System.IO
import System.Process import System.Process
import Data.Monoid
import Data.List.Utils (replace) import Data.List.Utils (replace)
import Control.Monad (when, replicateM_) import Control.Monad (when, replicateM_)
import Control.Retry import Control.Retry
@ -21,7 +22,7 @@ telegramProcess = do
telegramSocket :: IO Handle telegramSocket :: IO Handle
telegramSocket = recoverAll timeout connect telegramSocket = recoverAll timeout (const connect)
where connect = connectTo host (PortNumber port) where connect = connectTo host (PortNumber port)
timeout = fibonacciBackoff 100000 <> limitRetries 5 timeout = fibonacciBackoff 100000 <> limitRetries 5