summaryrefslogtreecommitdiff
path: root/src/Network/QueryResponse.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/QueryResponse.hs')
-rw-r--r--src/Network/QueryResponse.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Network/QueryResponse.hs b/src/Network/QueryResponse.hs
index 01981cc8..c4ff50e3 100644
--- a/src/Network/QueryResponse.hs
+++ b/src/Network/QueryResponse.hs
@@ -231,7 +231,7 @@ asyncQuery_ (Client net d err pending whoami _) meth q addr0 withResponse = do
231 `catchIOError` (\e -> return Nothing) 231 `catchIOError` (\e -> return Nothing)
232 return (tid,now,expiry) 232 return (tid,now,expiry)
233 233
234asyncQuery :: Client err meth tid addr x 234asyncQuery :: Show meth => Client err meth tid addr x
235 -> MethodSerializer tid addr x meth a b 235 -> MethodSerializer tid addr x meth a b
236 -> a 236 -> a
237 -> addr 237 -> addr
@@ -240,9 +240,11 @@ asyncQuery :: Client err meth tid addr x
240asyncQuery client meth q addr withResponse0 = do 240asyncQuery client meth q addr withResponse0 = do
241 tm <- getSystemTimerManager 241 tm <- getSystemTimerManager
242 tidvar <- newEmptyMVar 242 tidvar <- newEmptyMVar
243 timedout <- registerTimeout tm 300000000 $ do 243 timedout <- registerTimeout tm 1000000 $ do
244 dput XMisc $ "async TIMEDOUT " ++ show (method meth)
244 withResponse0 Nothing 245 withResponse0 Nothing
245 tid <- takeMVar tidvar 246 tid <- takeMVar tidvar
247 dput XMisc $ "async TIMEDOUT mvar " ++ show (method meth)
246 case client of 248 case client of
247 Client { clientDispatcher = d, clientPending = pending } -> do 249 Client { clientDispatcher = d, clientPending = pending } -> do
248 atomically $ readTVar pending >>= dispatchCancel (tableMethods d) tid >>= writeTVar pending 250 atomically $ readTVar pending >>= dispatchCancel (tableMethods d) tid >>= writeTVar pending
@@ -251,6 +253,7 @@ asyncQuery client meth q addr withResponse0 = do
251 withResponse0 x 253 withResponse0 x
252 putMVar tidvar tid 254 putMVar tidvar tid
253 updateTimeout tm timedout expiry 255 updateTimeout tm timedout expiry
256 dput XMisc $ "FIN asyncQuery "++show (method meth)++" TIMEOUT="++show expiry
254 257
255-- | Send a query to a remote peer. Note that this function will always time 258-- | Send a query to a remote peer. Note that this function will always time
256-- out if 'forkListener' was never invoked to spawn a thread to receive and 259-- out if 'forkListener' was never invoked to spawn a thread to receive and