lib/connections: Add KCP blacklist period

This commit is contained in:
Audrius Butkevicius 2017-10-22 13:56:19 +01:00
parent 0d30166357
commit b2966957e0

View File

@ -15,6 +15,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/AudriusButkevicius/kcp-go"
"github.com/AudriusButkevicius/pfilter" "github.com/AudriusButkevicius/pfilter"
"github.com/xtaci/smux" "github.com/xtaci/smux"
) )
@ -24,6 +25,10 @@ var (
filters filterList filters filterList
) )
func init() {
kcp.BlacklistDuration = 10 * time.Minute
}
type filterList []*pfilter.PacketFilter type filterList []*pfilter.PacketFilter
// Sort connections by whether they are unspecified or not, as connections // Sort connections by whether they are unspecified or not, as connections