Add incoming connection relay service
This commit is contained in:
@@ -668,6 +668,13 @@ func syncthingMain() {
|
||||
l.Fatalln("Bad listen address:", err)
|
||||
}
|
||||
|
||||
// Start the relevant services
|
||||
|
||||
connectionSvc := newConnectionSvc(cfg, myID, m, tlsCfg)
|
||||
relaySvc := newRelaySvc(cfg, tlsCfg, connectionSvc.conns)
|
||||
connectionSvc.Add(relaySvc)
|
||||
mainSvc.Add(connectionSvc)
|
||||
|
||||
// Start discovery
|
||||
|
||||
localPort := addr.Port
|
||||
@@ -681,10 +688,6 @@ func syncthingMain() {
|
||||
mainSvc.Add(upnpSvc)
|
||||
}
|
||||
|
||||
connectionSvc := newConnectionSvc(cfg, myID, m, tlsCfg)
|
||||
cfg.Subscribe(connectionSvc)
|
||||
mainSvc.Add(connectionSvc)
|
||||
|
||||
if cpuProfile {
|
||||
f, err := os.Create(fmt.Sprintf("cpu-%d.pprof", os.Getpid()))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user