lib: Removal global connection registry (#8254)
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"github.com/thejerf/suture/v4"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/config"
|
||||
"github.com/syncthing/syncthing/lib/connections/registry"
|
||||
"github.com/syncthing/syncthing/lib/events"
|
||||
"github.com/syncthing/syncthing/lib/nat"
|
||||
"github.com/syncthing/syncthing/lib/protocol"
|
||||
@@ -414,7 +415,7 @@ func withConnectionPair(b *testing.B, connUri string, h func(client, server inte
|
||||
}
|
||||
natSvc := nat.NewService(deviceId, wcfg)
|
||||
conns := make(chan internalConn, 1)
|
||||
listenSvc := lf.New(uri, wcfg, tlsCfg, conns, natSvc)
|
||||
listenSvc := lf.New(uri, wcfg, tlsCfg, conns, natSvc, registry.New())
|
||||
supervisor.Add(listenSvc)
|
||||
|
||||
var addr *url.URL
|
||||
@@ -433,7 +434,8 @@ func withConnectionPair(b *testing.B, connUri string, h func(client, server inte
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
dialer := df.New(cfg.Options, tlsCfg)
|
||||
// Purposely using a different registry: Don't want to reuse port between dialer and listener on the same device
|
||||
dialer := df.New(cfg.Options, tlsCfg, registry.New())
|
||||
|
||||
// Relays might take some time to register the device, so dial multiple times
|
||||
clientConn, err := dialer.Dial(ctx, deviceId, addr)
|
||||
|
||||
Reference in New Issue
Block a user