From 09d886b5980cf3bee327dcf0b57b5209dcb4237d Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Thu, 3 Sep 2015 19:12:41 +0530
Subject: [PATCH] bug: initial state should be meInterested = false, heChoking
 = true

Otherwise, the "InterestedMsg" never get sent.
---
 src/FuncTorrent/Peer.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/FuncTorrent/Peer.hs b/src/FuncTorrent/Peer.hs
index cf5b66d..5e23fa1 100644
--- 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 False True
+  let pstate = toPeerState h p False False True True
       pieceHash = pieces (info m)
       numPieces = (toInteger . (`quot` 20) . BC.length) pieceHash
       pLen = pieceLength (info m)
-- 
2.45.2