Skip to content

Commit

Permalink
remoce printers
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jul 4, 2024
1 parent 5bc4a90 commit 76e9891
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,8 @@ func (p *Peer) close(lockTorrent bool) {
if p.t != nil {
p.t.iterPeers(func(o *Peer) {
if o != p {
fmt.Println("ONCLOSE1A", o.String())
if o.isLowOnRequests(true, lockTorrent) {
fmt.Println("ONCLOSE1B", o.String())
o.updateRequests("peer.Close", lockTorrent)
o.updateRequests("Peer.closed", lockTorrent)
}
}
}, lockTorrent)
Expand Down
3 changes: 0 additions & 3 deletions webseed-peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,9 @@ func (ws *webseedPeer) handleUpdateRequests(lockTorrent bool) {
}

func (ws *webseedPeer) onClose(lockTorrent bool) {
fmt.Println("ONCLOSE", ws.String())
defer fmt.Println("ONCLOSE", "DONE", ws.String())
ws.peer.logger.Levelf(log.Debug, "closing")
// Just deleting them means we would have to manually cancel active requests.
ws.peer.cancelAllRequests(false, lockTorrent)
fmt.Println("ONCLOSE1", ws.String())
ws.requesterCond.Broadcast()
}

Expand Down

0 comments on commit 76e9891

Please sign in to comment.