diff options
-rw-r--r-- | src/Network/BitTorrent/Tracker/RPC.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC.hs b/src/Network/BitTorrent/Tracker/RPC.hs index 022751b4..3acffce9 100644 --- a/src/Network/BitTorrent/Tracker/RPC.hs +++ b/src/Network/BitTorrent/Tracker/RPC.hs | |||
@@ -143,9 +143,10 @@ packException f m = try m >>= either (throwIO . f) return | |||
143 | 143 | ||
144 | dispatch :: URI -> IO a -> IO a -> IO a | 144 | dispatch :: URI -> IO a -> IO a -> IO a |
145 | dispatch URI {..} http udp | 145 | dispatch URI {..} http udp |
146 | | uriScheme == "http:" = packException HttpException http | 146 | | uriScheme == "http:" || |
147 | | uriScheme == "udp:" = packException UdpException udp | 147 | uriScheme == "https:" = packException HttpException http |
148 | | otherwise = throwIO $ UnrecognizedProtocol uriScheme | 148 | | uriScheme == "udp:" = packException UdpException udp |
149 | | otherwise = throwIO $ UnrecognizedProtocol uriScheme | ||
149 | 150 | ||
150 | announce :: Manager -> URI -> SAnnounceQuery -> IO AnnounceInfo | 151 | announce :: Manager -> URI -> SAnnounceQuery -> IO AnnounceInfo |
151 | announce Manager {..} uri simpleQuery | 152 | announce Manager {..} uri simpleQuery |