projects
/
functorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f06df8
)
bug: initial state should be meInterested = false, heChoking = true
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Thu, 3 Sep 2015 13:42:41 +0000
(19:12 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Thu, 3 Sep 2015 13:42:49 +0000
(19:12 +0530)
Otherwise, the "InterestedMsg" never get sent.
src/FuncTorrent/Peer.hs
patch
|
blob
|
history
diff --git
a/src/FuncTorrent/Peer.hs
b/src/FuncTorrent/Peer.hs
index cf5b66d35f35e6069b26cf1f56ecb1d893984fd8..5e23fa112574c0ca07f6ddfbde0f36212a932720 100644
(file)
--- a/
src/FuncTorrent/Peer.hs
+++ b/
src/FuncTorrent/Peer.hs
@@
-120,7
+120,7
@@
handlePeerMsgs :: Peer -> Metainfo -> String -> IO ()
handlePeerMsgs p m peerId = do
h <- connectToPeer p
doHandshake h p (infoHash m) peerId
- let pstate = toPeerState h p False
True Fals
e True
+ let pstate = toPeerState h p False
False Tru
e True
pieceHash = pieces (info m)
numPieces = (toInteger . (`quot` 20) . BC.length) pieceHash
pLen = pieceLength (info m)