diff --git a/peer.go b/peer.go index 559f304a11..a81f7c5593 100644 --- a/peer.go +++ b/peer.go @@ -386,6 +386,7 @@ func (p *Peer) close(lock bool, lockTorrent bool) { } p.peerImpl.onClose(false) if p.t != nil { + fmt.Println("CWAP-CLS") p.t.decPeerPieceAvailability(p, false, false) } for _, f := range p.callbacks.PeerClosed { diff --git a/peerconn.go b/peerconn.go index 145e907726..8b3247a465 100644 --- a/peerconn.go +++ b/peerconn.go @@ -590,6 +590,7 @@ func (cn *PeerConn) peerSentHaveNone(lockTorrent bool) error { defer cn.mu.Unlock() if !cn.peerSentHaveAll { + fmt.Println("CWAP-PSHN") cn.t.decPeerPieceAvailability(&cn.Peer, false, false) } cn._peerPieces.Clear() diff --git a/torrent.go b/torrent.go index 0bc5bbe8ed..57bda6e90f 100644 --- a/torrent.go +++ b/torrent.go @@ -1994,7 +1994,7 @@ func (t *Torrent) deletePeerConn(c *PeerConn, lock bool) (ret bool) { } _, ret = t.conns[c] delete(t.conns, c) - fmt.Println("-CON", t.numActivePeers(false), c.String()) + fmt.Println("-CONN", len(t.connsWithAllPieces), t.numActivePeers(false), c.String()) // Avoid adding a drop event more than once. Probably we should track whether we've generated // the drop event against the PexConnState instead. if ret {