summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-11-25 18:24:27 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-01 22:50:28 -0500
commita39e744dd2c6895cc287cf43ed4704252dcf8293 (patch)
tree927d17f802ccea4f1c09fd5806e3ef8475e003a2
parent02a3fc24a1008d1cd323a3142874bead5829ccae (diff)
QueryResponse: Support the IO varient of fdSocket.
-rw-r--r--dht/src/Network/QueryResponse.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/dht/src/Network/QueryResponse.hs b/dht/src/Network/QueryResponse.hs
index c7ab59d8..9c33b911 100644
--- a/dht/src/Network/QueryResponse.hs
+++ b/dht/src/Network/QueryResponse.hs
@@ -622,8 +622,11 @@ udpTransport' bind_address = do
622 , closeTransport = do 622 , closeTransport = do
623 dput XMisc $ "closeTransport for udpTransport' called. " ++ show bind_address 623 dput XMisc $ "closeTransport for udpTransport' called. " ++ show bind_address
624 tryPutMVar isClosed () -- signal awaitMessage that the transport is closed. 624 tryPutMVar isClosed () -- signal awaitMessage that the transport is closed.
625#if !MIN_VERSION_network (3,1,0) 625#if MIN_VERSION_network (3,1,0)
626 let withFdSocket sock f = f (fdSocket sock) 626#elif MIN_VERSION_network(3,0,0)
627 let withFdSocket sock f = fdSocket sock >>= f >>= seq sock . return
628#else
629 let withFdSocket sock f = f (fdSocket sock) >>= seq sock . return
627#endif 630#endif
628 withFdSocket sock $ \fd -> do 631 withFdSocket sock $ \fd -> do
629 let sorryGHCButIAmNotFuckingClosingTheSocketYet fd = return () 632 let sorryGHCButIAmNotFuckingClosingTheSocketYet fd = return ()