summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Network/BitTorrent/Tracker/RPC/HTTP.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
index 37ddb5ad..33ceb077 100644
--- a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
+++ b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
@@ -127,9 +127,9 @@ fillRequest Options {..} q r = r
127 | otherwise = a <> "&" <> b 127 | otherwise = a <> "&" <> b
128 128
129httpTracker :: BEncode a => Manager -> URI -> SimpleQuery -> IO a 129httpTracker :: BEncode a => Manager -> URI -> SimpleQuery -> IO a
130httpTracker Manager {..} uri q = do 130httpTracker Manager {..} uri q = packHttpException $ do
131 request <- fillRequest options q <$> setUri def uri 131 request <- fillRequest options q <$> setUri def uri
132 response <- packHttpException $ runResourceT $ httpLbs request httpMgr 132 response <- runResourceT $ httpLbs request httpMgr
133 case BE.decode $ BL.toStrict $ responseBody response of 133 case BE.decode $ BL.toStrict $ responseBody response of
134 Left msg -> throwIO (ParserFailure msg) 134 Left msg -> throwIO (ParserFailure msg)
135 Right info -> return info 135 Right info -> return info