From 8c06c997e2072c23db4273cdd000b39de8b70035 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Sat, 2 Aug 2014 00:34:30 +0200 Subject: Fix some trivial UDPSpec failures --- src/Network/BitTorrent/Tracker/RPC/UDP.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Network/BitTorrent/Tracker/RPC/UDP.hs b/src/Network/BitTorrent/Tracker/RPC/UDP.hs index 24e96238..31b6b870 100644 --- a/src/Network/BitTorrent/Tracker/RPC/UDP.hs +++ b/src/Network/BitTorrent/Tracker/RPC/UDP.hs @@ -123,10 +123,14 @@ checkOptions Options {..} = do throwIO $ userError "optMinTimeout must be positive" unless (optMaxTimeout > 0) $ do + throwIO $ userError "optMaxTimeout must be positive" + + unless (optMultiplier > 0) $ do + throwIO $ userError "optMultiplier must be positive" + + unless (optMaxTimeout > optMinTimeout) $ do throwIO $ userError "optMaxTimeout must be greater than optMinTimeout" - unless (optMinTimeout > 0) $ do - throwIO $ userError "optMinTimeout must be positive" {----------------------------------------------------------------------- -- Manager state -- cgit v1.2.3