diff options
Diffstat (limited to 'src/Network/BitTorrent/Exchange.hs')
-rw-r--r-- | src/Network/BitTorrent/Exchange.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Exchange.hs b/src/Network/BitTorrent/Exchange.hs index 5be9ae73..a0e7df8c 100644 --- a/src/Network/BitTorrent/Exchange.hs +++ b/src/Network/BitTorrent/Exchange.hs | |||
@@ -171,10 +171,7 @@ runP2P se addr p2p = waitVacancy se $ runSession se addr p2p | |||
171 | -- some other loop. Note that this function may block while waiting | 171 | -- some other loop. Note that this function may block while waiting |
172 | -- for a vacant place: use forkIO and runP2P instead. | 172 | -- for a vacant place: use forkIO and runP2P instead. |
173 | spawnP2P :: SwarmSession -> PeerAddr -> P2P () -> IO ThreadId | 173 | spawnP2P :: SwarmSession -> PeerAddr -> P2P () -> IO ThreadId |
174 | spawnP2P se addr p2p = do | 174 | spawnP2P se addr p2p = forkThrottle se $ runSession se addr p2p |
175 | enterSwarm se | ||
176 | forkIO $ do | ||
177 | runSession se addr p2p `finally` leaveSwarm se | ||
178 | 175 | ||
179 | -- TODO unify this all using PeerConnection | 176 | -- TODO unify this all using PeerConnection |
180 | {- | 177 | {- |