]> Sergey Matveev's repositories - btrtrc.git/blobdiff - peerconn.go
Support banning webseeds
[btrtrc.git] / peerconn.go
index bc16ae6c63cabad8a18680e5ac9da3cb280c4574..6615d79c5a4573bab13a3561b5be4d95463fe170 100644 (file)
@@ -1590,6 +1590,10 @@ func (cn *PeerConn) drop() {
        cn.t.dropConnection(cn)
 }
 
+func (cn *PeerConn) ban() {
+       cn.t.cl.banPeerIP(cn.remoteIp())
+}
+
 func (cn *Peer) netGoodPiecesDirtied() int64 {
        return cn._stats.PiecesDirtiedGood.Int64() - cn._stats.PiecesDirtiedBad.Int64()
 }