Do not start relay service unless explicitly asked for, or global announcement server is running
This commit is contained in:
@@ -630,7 +630,7 @@ func syncthingMain() {
|
||||
m.StartDeadlockDetector(time.Duration(it) * time.Second)
|
||||
}
|
||||
} else if !IsRelease || IsBeta {
|
||||
m.StartDeadlockDetector(20 * 60 * time.Second)
|
||||
m.StartDeadlockDetector(20 * time.Minute)
|
||||
}
|
||||
|
||||
// Clear out old indexes for other devices. Otherwise we'll start up and
|
||||
@@ -674,10 +674,13 @@ func syncthingMain() {
|
||||
// Start the relevant services
|
||||
|
||||
connectionSvc := newConnectionSvc(cfg, myID, m, tlsCfg)
|
||||
relaySvc = relay.NewSvc(cfg, tlsCfg, connectionSvc.conns)
|
||||
connectionSvc.Add(relaySvc)
|
||||
mainSvc.Add(connectionSvc)
|
||||
|
||||
if opts.GlobalAnnEnabled || opts.RelayWithoutGlobalAnn {
|
||||
relaySvc = relay.NewSvc(cfg, tlsCfg, connectionSvc.conns)
|
||||
connectionSvc.Add(relaySvc)
|
||||
}
|
||||
|
||||
// Start discovery
|
||||
|
||||
localPort := addr.Port
|
||||
|
||||
Reference in New Issue
Block a user