diff options
author | joe <joe@jerkface.net> | 2017-07-29 21:11:43 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-07-29 21:11:43 -0400 |
commit | 5c7fe03886eb30bc656c266c72aff1bf7cc3942a (patch) | |
tree | e10d65e020dd9864a770e7f159e0211e2e1f735f /src/Network | |
parent | e8aed649ce21f1167b78e1604e3760df47e9a721 (diff) |
Tox support.
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/QueryResponse.hs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/Network/QueryResponse.hs b/src/Network/QueryResponse.hs index 5803e756..29a221e8 100644 --- a/src/Network/QueryResponse.hs +++ b/src/Network/QueryResponse.hs | |||
@@ -18,17 +18,17 @@ import GHC.Conc (labelThread) | |||
18 | import Control.Concurrent.STM | 18 | import Control.Concurrent.STM |
19 | import Control.Exception | 19 | import Control.Exception |
20 | import Control.Monad | 20 | import Control.Monad |
21 | import qualified Data.ByteString as B | 21 | import qualified Data.ByteString as B |
22 | ;import Data.ByteString (ByteString) | 22 | ;import Data.ByteString (ByteString) |
23 | import Data.Function | 23 | import Data.Function |
24 | import qualified Data.IntMap as IntMap | 24 | import qualified Data.IntMap.Strict as IntMap |
25 | ;import Data.IntMap (IntMap) | 25 | ;import Data.IntMap.Strict (IntMap) |
26 | import qualified Data.Map as Map | 26 | import qualified Data.Map.Strict as Map |
27 | ;import Data.Map (Map) | 27 | ;import Data.Map.Strict (Map) |
28 | import Data.Maybe | 28 | import Data.Maybe |
29 | import Data.Typeable | 29 | import Data.Typeable |
30 | import Network.Socket | 30 | import Network.Socket |
31 | import Network.Socket.ByteString as B | 31 | import Network.Socket.ByteString as B |
32 | import System.IO | 32 | import System.IO |
33 | import System.IO.Error | 33 | import System.IO.Error |
34 | import System.Timeout | 34 | import System.Timeout |
@@ -415,5 +415,8 @@ udpTransport bind_address = do | |||
415 | r <- B.recvFrom sock udpBufferSize | 415 | r <- B.recvFrom sock udpBufferSize |
416 | return $ Just $ Right r | 416 | return $ Just $ Right r |
417 | , sendMessage = \addr bs -> void $ B.sendTo sock bs addr | 417 | , sendMessage = \addr bs -> void $ B.sendTo sock bs addr |
418 | -- TODO: sendTo: does not exist (Network is unreachable) | ||
419 | -- Occurs when IPv6 network is not available. | ||
420 | -- Currently, we require -threaded to prevent a forever-hang in this case. | ||
418 | , closeTransport = close sock | 421 | , closeTransport = close sock |
419 | } | 422 | } |