summaryrefslogtreecommitdiff
path: root/src/Network/KRPC/Manager.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/KRPC/Manager.hs')
-rw-r--r--src/Network/KRPC/Manager.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Network/KRPC/Manager.hs b/src/Network/KRPC/Manager.hs
index 0b090e6b..c63967d0 100644
--- a/src/Network/KRPC/Manager.hs
+++ b/src/Network/KRPC/Manager.hs
@@ -148,11 +148,13 @@ query addr params = do
148 sendMessage sock addr q 148 sendMessage sock addr q
149 `onException` unregisterQuery (tid, addr) pendingCalls 149 `onException` unregisterQuery (tid, addr) pendingCalls
150 150
151 mres <- timeout (queryTimeout * 10 ^ 6) $ queryResponse ares 151 mres <- timeout (queryTimeout * 10 ^ (6 :: Int)) $ do
152 queryResponse ares
153
152 case mres of 154 case mres of
153 Just res -> return res 155 Just res -> return res
154 Nothing -> do 156 Nothing -> do
155 unregisterQuery (tid, addr) pendingCalls 157 _ <- unregisterQuery (tid, addr) pendingCalls
156 throwIO $ timeoutExpired tid 158 throwIO $ timeoutExpired tid
157 159
158{----------------------------------------------------------------------- 160{-----------------------------------------------------------------------