X-Git-Url: https://git.rkrishnan.org/?p=functorrent.git;a=blobdiff_plain;f=src%2FFuncTorrent%2FTracker.hs;h=9873fe1513f073f05efe79b97b2e9bae1522e75e;hp=39ed2982f51bed44181ce73fca3eb7217330c4f9;hb=a533e0ed9679e77a3e50eb1786dbe3017a4e9928;hpb=386df507252c466f486f3b1570a885d597487469 diff --git a/src/FuncTorrent/Tracker.hs b/src/FuncTorrent/Tracker.hs index 39ed298..9873fe1 100644 --- a/src/FuncTorrent/Tracker.hs +++ b/src/FuncTorrent/Tracker.hs @@ -56,7 +56,7 @@ runTracker msgChannel fsChan infohash port peerId announceList sz = do 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 @@ -68,7 +68,7 @@ runTracker msgChannel fsChan infohash port peerId announceList sz = do getTrackerType :: String -> TrackerProtocol getTrackerType url | "http://" `isPrefixOf` url = Http | "udp://" `isPrefixOf` url = Udp - | otherwise = UnknownProtocol + | otherwise = UnknownProtocol msgHandler :: MsgChannel -> StateT TState IO ()