From cfd4492b3eaaa60332ea25af64317d4d39fb511a Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Sun, 3 May 2015 14:44:58 +0530
Subject: [PATCH] Remove the redundant withSocketsDo call wrapping simpleHTTP

simpleHTTP calls withSocketsDo deep inside, so no need to wrap
it outside.
---
 src/FuncTorrent/Network.hs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/FuncTorrent/Network.hs b/src/FuncTorrent/Network.hs
index 001fe0e..eac69c9 100644
--- a/src/FuncTorrent/Network.hs
+++ b/src/FuncTorrent/Network.hs
@@ -11,7 +11,6 @@ import Data.ByteString (ByteString)
 import Data.ByteString.Char8 as BC (pack, unpack, concat, intercalate)
 import Network.HTTP (simpleHTTP, defaultGETRequest_, getResponseBody)
 import Network.URI (parseURI)
-import Network.Socket (withSocketsDo)
 
 -- | Make a query string from a alist of k, v
 -- TODO: Url encode each argument
@@ -19,7 +18,7 @@ mkParams :: [(String, ByteString)] -> ByteString
 mkParams params = BC.intercalate "&" [concat [pack f, "=", s] | (f,s) <- params]
 
 get :: String -> [(String, ByteString)] -> IO ByteString
-get url args = withSocketsDo $ simpleHTTP (defaultGETRequest_ url') >>= getResponseBody
+get url args = simpleHTTP (defaultGETRequest_ url') >>= getResponseBody
     where url' = case parseURI $ unpack $ concat [pack url, "?", qstr] of
                    Just x -> x
                    _ -> error "Bad tracker URL"
-- 
2.45.2