Allow not to limit bandwidth in LAN (fixes #1336)
This commit is contained in:
@@ -115,6 +115,7 @@ var (
|
||||
externalPort int
|
||||
igd *upnp.IGD
|
||||
cert tls.Certificate
|
||||
lans []*net.IPNet
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -494,6 +495,10 @@ func syncthingMain() {
|
||||
readRateLimit = ratelimit.NewBucketWithRate(float64(1000*opts.MaxRecvKbps), int64(5*1000*opts.MaxRecvKbps))
|
||||
}
|
||||
|
||||
if opts.MaxRecvKbps > 0 || opts.MaxSendKbps > 0 {
|
||||
lans, _ = osutil.GetLans()
|
||||
}
|
||||
|
||||
dbFile := filepath.Join(confDir, "index")
|
||||
dbOpts := &opt.Options{OpenFilesCacheCapacity: 100}
|
||||
ldb, err := leveldb.OpenFile(dbFile, dbOpts)
|
||||
|
||||
Reference in New Issue
Block a user