summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Internal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Internal.hs')
-rw-r--r--src/Network/BitTorrent/Internal.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Internal.hs b/src/Network/BitTorrent/Internal.hs
index eaeb04e8..5a7e493f 100644
--- a/src/Network/BitTorrent/Internal.hs
+++ b/src/Network/BitTorrent/Internal.hs
@@ -538,7 +538,7 @@ findPieceCount = pieceCount . tInfo . torrentMeta . swarmSession
538-- 3. Signal to the all other peer about this. 538-- 3. Signal to the all other peer about this.
539 539
540available :: Bitfield -> SwarmSession -> IO () 540available :: Bitfield -> SwarmSession -> IO ()
541available bf se @ SwarmSession {..} = do 541available bf se @ SwarmSession {..} = {-# SCC available #-} do
542 mark >> atomically broadcast 542 mark >> atomically broadcast
543 where 543 where
544 mark = do 544 mark = do
@@ -561,7 +561,8 @@ available bf se @ SwarmSession {..} = do
561-- changed client state. Resulting queue should be sent to a peer 561-- changed client state. Resulting queue should be sent to a peer
562-- immediately. 562-- immediately.
563getPending :: PeerSession -> IO [Message] 563getPending :: PeerSession -> IO [Message]
564getPending PeerSession {..} = atomically (readAvail pendingMessages) 564getPending PeerSession {..} = {-# SCC getPending #-} do
565 atomically (readAvail pendingMessages)
565 566
566readAvail :: TChan a -> STM [a] 567readAvail :: TChan a -> STM [a]
567readAvail chan = do 568readAvail chan = do