summaryrefslogtreecommitdiff
path: root/src/Network/QueryResponse.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-03 23:22:15 -0400
committerjoe <joe@jerkface.net>2017-11-03 23:22:15 -0400
commite8edad1852aa245a994c72d8331474b521042a25 (patch)
treeb00b20f3badb98265ce1aae5309ec59e9ab245e8 /src/Network/QueryResponse.hs
parent133d40e02714e75b9f528314280f7348da6bba87 (diff)
Better handling for Network.Socket.sendTo: does not exist error.
Diffstat (limited to 'src/Network/QueryResponse.hs')
-rw-r--r--src/Network/QueryResponse.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/QueryResponse.hs b/src/Network/QueryResponse.hs
index f15a0855..b757aed7 100644
--- a/src/Network/QueryResponse.hs
+++ b/src/Network/QueryResponse.hs
@@ -189,8 +189,9 @@ sendQuery (Client net d err pending whoami _) meth q addr0 = do
189 writeTVar pending tbl' 189 writeTVar pending tbl'
190 return (tid,addr,expiry) 190 return (tid,addr,expiry)
191 self <- whoami (Just addr) 191 self <- whoami (Just addr)
192 sendMessage net addr (wrapQuery meth tid self addr q) 192 mres <- do sendMessage net addr (wrapQuery meth tid self addr q)
193 mres <- timeout expiry $ takeMVar mvar 193 timeout expiry $ takeMVar mvar
194 `catchIOError` (\e -> return Nothing)
194 case mres of 195 case mres of
195 Just x -> return $ Just $ unwrapResponse meth x 196 Just x -> return $ Just $ unwrapResponse meth x
196 Nothing -> do 197 Nothing -> do