lib: Removal global connection registry (#8254)

This commit is contained in:
Simon Frei
2022-04-09 16:04:56 +02:00
committed by GitHub
parent e30898ddb3
commit b947056e62
17 changed files with 118 additions and 94 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import (
"time"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/connections/registry"
"github.com/syncthing/syncthing/lib/events"
"github.com/syncthing/syncthing/lib/protocol"
)
@@ -23,7 +24,7 @@ func setupCache() *manager {
cfg.Options.LocalAnnEnabled = false
cfg.Options.GlobalAnnEnabled = false
return NewManager(protocol.LocalDeviceID, config.Wrap("", cfg, protocol.LocalDeviceID, events.NoopLogger), tls.Certificate{}, events.NoopLogger, nil).(*manager)
return NewManager(protocol.LocalDeviceID, config.Wrap("", cfg, protocol.LocalDeviceID, events.NoopLogger), tls.Certificate{}, events.NoopLogger, nil, registry.New()).(*manager)
}
func TestCacheUnique(t *testing.T) {