Skip to content

Commit

Permalink
don't close on ban
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jun 29, 2024
1 parent b1c7ad9 commit 3e3510d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions webseed-peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,14 @@ func (ws *webseedPeer) drop(lock bool, lockTorrent bool) {
}

func (cn *webseedPeer) ban() {
cn.peer.mu.RLock()
banCount := cn.peer.banCount
cn.peer.mu.RUnlock()

if banCount > 5 {
cn.peer.close(true, true)
return
}
//cn.peer.mu.RLock()
//banCount := cn.peer.banCount
//cn.peer.mu.RUnlock()

//if banCount > 5 {
// cn.peer.close(true, true)
// return
//}

cn.peer.drop(true, true)

Expand Down

0 comments on commit 3e3510d

Please sign in to comment.