Skip to content

Commit

Permalink
conn printers
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jul 3, 2024
1 parent 454a6b3 commit 1f0671a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (p *Peer) close(lock bool, lockTorrent bool) {
}
p.peerImpl.onClose(false)
if p.t != nil {
fmt.Println("CWAP-CLS", p.t.Name())
fmt.Println("CWAP-CLS", len(p.t.connsWithAllPieces), p.t.numActivePeers(false), p.t.Name())
p.t.decPeerPieceAvailability(p, false, false)
}
for _, f := range p.callbacks.PeerClosed {
Expand Down
2 changes: 1 addition & 1 deletion peerconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ func (cn *PeerConn) peerSentHaveNone(lockTorrent bool) error {
defer cn.mu.Unlock()

if !cn.peerSentHaveAll {
fmt.Println("CWAP-PSHN", cn.t.Name())
fmt.Println("CWAP-PSHN", len(cn.t.connsWithAllPieces), cn.t.numActivePeers(false), cn.t.Name())
cn.t.decPeerPieceAvailability(&cn.Peer, false, false)
}
cn._peerPieces.Clear()
Expand Down
2 changes: 1 addition & 1 deletion torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ func (t *Torrent) deletePeerConn(c *PeerConn, lock bool) (ret bool) {
}
_, ret = t.conns[c]
delete(t.conns, c)
fmt.Println("-CWAP-CN", len(t.connsWithAllPieces), t.numActivePeers(false), c.String())
fmt.Println("-CWAP-CN", len(t.connsWithAllPieces), t.numActivePeers(false), t.Name(), 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 {
Expand Down

0 comments on commit 1f0671a

Please sign in to comment.