diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/node.go b/cmd/dendrite-demo-yggdrasil/yggconn/node.go index a326dd442..697813c3c 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/node.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/node.go @@ -127,7 +127,7 @@ func Setup(instanceName, storageDirectory string) (*Node, error) { MaxIncomingUniStreams: 0, KeepAlive: true, MaxIdleTimeout: time.Minute * 30, - HandshakeTimeout: time.Second * 30, + HandshakeTimeout: time.Second * 15, } n.log.Println("Public curve25519:", n.core.EncryptionPublicKey()) diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/session.go b/cmd/dendrite-demo-yggdrasil/yggconn/session.go index 09b0bd22c..6c7b427d5 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/session.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/session.go @@ -109,6 +109,7 @@ func (n *Node) DialContext(ctx context.Context, network, address string) (net.Co if v, ok := n.coords.Load(address); ok { coords, ok := v.(yggdrasil.Coords) if !ok { + n.coords.Delete(address) return nil, errors.New("should have found yggdrasil.Coords but didn't") } n.log.Infof("Coords %s for %q cached, trying to dial", coords.String(), address) @@ -132,7 +133,6 @@ func (n *Node) DialContext(ctx context.Context, network, address string) (net.Co // know about from our direct switch peers. for _, peer := range n.core.GetSwitchPeers() { if peer.PublicKey.String() == address { - fmt.Println("*", peer.PublicKey.String(), address) coords = peer.Coords n.log.Infof("%q is a direct peer, coords are %s", address, coords.String()) n.coords.Store(address, coords)