summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Client/Handle.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Client/Handle.hs')
-rw-r--r--src/Network/BitTorrent/Client/Handle.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Client/Handle.hs b/src/Network/BitTorrent/Client/Handle.hs
index e7ac779c..e7884caa 100644
--- a/src/Network/BitTorrent/Client/Handle.hs
+++ b/src/Network/BitTorrent/Client/Handle.hs
@@ -110,12 +110,12 @@ start Handle {..} = do
110 Client {..} <- getClient 110 Client {..} <- getClient
111 liftIO $ Tracker.notify trackerManager trackers Tracker.Started 111 liftIO $ Tracker.notify trackerManager trackers Tracker.Started
112 unless private $ do 112 unless private $ do
113 liftDHT $ DHT.insert topic undefined 113 liftDHT $ DHT.insert topic (error "start")
114 liftIO $ do 114 liftIO $ do
115 peers <- askPeers trackerManager trackers 115 peers <- askPeers trackerManager trackers
116 print $ "got: " ++ show (L.length peers) ++ " peers" 116 print $ "got: " ++ show (L.length peers) ++ " peers"
117 forM_ peers $ \ peer -> do 117 forM_ peers $ \ peer -> do
118 Exchange.insert peer exchange 118 Exchange.connect peer exchange
119 119
120-- | Stop downloading this torrent. 120-- | Stop downloading this torrent.
121pause :: Handle -> BitTorrent () 121pause :: Handle -> BitTorrent ()
@@ -126,7 +126,7 @@ stop :: Handle -> BitTorrent ()
126stop Handle {..} = do 126stop Handle {..} = do
127 Client {..} <- getClient 127 Client {..} <- getClient
128 unless private $ do 128 unless private $ do
129 liftDHT $ DHT.delete topic undefined 129 liftDHT $ DHT.delete topic (error "stop")
130 liftIO $ Tracker.notify trackerManager trackers Tracker.Stopped 130 liftIO $ Tracker.notify trackerManager trackers Tracker.Stopped
131 131
132{----------------------------------------------------------------------- 132{-----------------------------------------------------------------------