host = getHostname turl
case getTrackerType turl of
Http -> do
- _ <- forkIO $ HT.trackerLoop host port peerId infohash fsChan initialTState
+ _ <- forkIO $ HT.trackerLoop turl port peerId infohash fsChan initialTState
runStateT (msgHandler msgChannel) initialTState
return ()
Udp -> do
getTrackerType :: String -> TrackerProtocol
getTrackerType url | "http://" `isPrefixOf` url = Http
| "udp://" `isPrefixOf` url = Udp
- | otherwise = UnknownProtocol
+ | otherwise = UnknownProtocol
msgHandler :: MsgChannel -> StateT TState IO ()