mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-31 22:11:51 +00:00
lib/connections: Add KCP blacklist period
This commit is contained in:
parent
0d30166357
commit
b2966957e0
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user