|
|
|
|
@ -28,7 +28,6 @@ import Prelude
@@ -28,7 +28,6 @@ import Prelude
|
|
|
|
|
import System.IO.Unsafe(unsafePerformIO) |
|
|
|
|
import qualified Text.XML.Stream.Render as TXSR |
|
|
|
|
import Text.XML.Unresolved as TXU |
|
|
|
|
import System.Random |
|
|
|
|
|
|
|
|
|
-- | Apply f with the content of tv as state, restoring the original value when an |
|
|
|
|
-- exception occurs |
|
|
|
|
@ -93,13 +92,3 @@ hostnameP = do
@@ -93,13 +92,3 @@ hostnameP = do
|
|
|
|
|
if Text.length label + 1 + Text.length r > 255 |
|
|
|
|
then fail "Hostname too long." |
|
|
|
|
else return $ Text.concat [label, Text.pack ".", r] |
|
|
|
|
|
|
|
|
|
-- -- The number of seconds to wait before reconnection attempts in accordance with |
|
|
|
|
-- -- the truncated binary exponential backoff algorithm. |
|
|
|
|
-- waitingTimes :: IO [Int] |
|
|
|
|
-- waitingTimes = do |
|
|
|
|
-- wait <- randomRIO (1, 59) |
|
|
|
|
-- waits <- Prelude.mapM (\n -> randomRIO (0, wait * n)) slotTimes |
|
|
|
|
-- return (wait:waits) |
|
|
|
|
-- where |
|
|
|
|
-- slotTimes = [1, 3, 8, 15, 24, 35, 48, 63, 80, 99, 99, 99, 99, 99, 99] |
|
|
|
|
|