diff options
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r-- | src/Network/BitTorrent/Tracker/RPC/UDP.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC/UDP.hs b/src/Network/BitTorrent/Tracker/RPC/UDP.hs index 160397dd..0cb8e95e 100644 --- a/src/Network/BitTorrent/Tracker/RPC/UDP.hs +++ b/src/Network/BitTorrent/Tracker/RPC/UDP.hs | |||
@@ -212,6 +212,9 @@ data RpcException | |||
212 | -- | Unable to lookup hostname; | 212 | -- | Unable to lookup hostname; |
213 | | HostLookupFailed | 213 | | HostLookupFailed |
214 | 214 | ||
215 | -- | Expecting 'udp:', but some other scheme provided. | ||
216 | | UnrecognizedScheme String | ||
217 | |||
215 | -- | Tracker exists but not responding for specific number of seconds. | 218 | -- | Tracker exists but not responding for specific number of seconds. |
216 | | TimeoutExpired Int | 219 | | TimeoutExpired Int |
217 | 220 | ||
@@ -250,7 +253,9 @@ resolveURI _ = throwIO HostUnknown | |||
250 | 253 | ||
251 | -- TODO caching? | 254 | -- TODO caching? |
252 | getTrackerAddr :: Manager -> URI -> IO SockAddr | 255 | getTrackerAddr :: Manager -> URI -> IO SockAddr |
253 | getTrackerAddr _ = resolveURI | 256 | getTrackerAddr _ uri |
257 | | uriScheme uri == "udp:" = resolveURI uri | ||
258 | | otherwise = throwIO (UnrecognizedScheme (uriScheme uri)) | ||
254 | 259 | ||
255 | {----------------------------------------------------------------------- | 260 | {----------------------------------------------------------------------- |
256 | Tokens | 261 | Tokens |