]> Sergey Matveev's repositories - btrtrc.git/blobdiff - peerconn.go
Support banning webseeds
[btrtrc.git] / peerconn.go
index ed77f44442f6ce36aae35dc75e99d12e97c51a39..280a82ae411d1c085bf845dc3b9eb4fe84298f80 100644 (file)
@@ -1595,6 +1595,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()
 }