Add separate client for dynamic relays (fixes #2368)
Did some manual tests in the playground, such as kicking off two clients in parallel, first connecting, second one getting a message about already being connected, falling back to the second address.
This commit is contained in:
@@ -102,7 +102,11 @@ func JoinSession(invitation protocol.SessionInvitation) (net.Conn, error) {
|
||||
func TestRelay(uri *url.URL, certs []tls.Certificate, sleep time.Duration, times int) bool {
|
||||
id := syncthingprotocol.NewDeviceID(certs[0].Certificate[0])
|
||||
invs := make(chan protocol.SessionInvitation, 1)
|
||||
c := NewProtocolClient(uri, certs, invs)
|
||||
c, err := NewClient(uri, certs, invs)
|
||||
if err != nil {
|
||||
close(invs)
|
||||
return false
|
||||
}
|
||||
go c.Serve()
|
||||
defer func() {
|
||||
close(invs)
|
||||
|
||||
Reference in New Issue
Block a user