summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-07-29 21:11:43 -0400
committerjoe <joe@jerkface.net>2017-07-29 21:11:43 -0400
commit5c7fe03886eb30bc656c266c72aff1bf7cc3942a (patch)
treee10d65e020dd9864a770e7f159e0211e2e1f735f /src/Network
parente8aed649ce21f1167b78e1604e3760df47e9a721 (diff)
Tox support.
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/QueryResponse.hs17
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)
18import Control.Concurrent.STM 18import Control.Concurrent.STM
19import Control.Exception 19import Control.Exception
20import Control.Monad 20import Control.Monad
21import qualified Data.ByteString as B 21import qualified Data.ByteString as B
22 ;import Data.ByteString (ByteString) 22 ;import Data.ByteString (ByteString)
23import Data.Function 23import Data.Function
24import qualified Data.IntMap as IntMap 24import qualified Data.IntMap.Strict as IntMap
25 ;import Data.IntMap (IntMap) 25 ;import Data.IntMap.Strict (IntMap)
26import qualified Data.Map as Map 26import qualified Data.Map.Strict as Map
27 ;import Data.Map (Map) 27 ;import Data.Map.Strict (Map)
28import Data.Maybe 28import Data.Maybe
29import Data.Typeable 29import Data.Typeable
30import Network.Socket 30import Network.Socket
31import Network.Socket.ByteString as B 31import Network.Socket.ByteString as B
32import System.IO 32import System.IO
33import System.IO.Error 33import System.IO.Error
34import System.Timeout 34import 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 }