mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Update Pinecone demo
This commit is contained in:
parent
3b7a4ad640
commit
4c129e3e3d
5 changed files with 9 additions and 9 deletions
|
@ -34,7 +34,7 @@ func ConnectToPeer(pRouter *pineconeRouter.Router, peer string) error {
|
|||
if parent == nil {
|
||||
return fmt.Errorf("failed to wrap connection")
|
||||
}
|
||||
_, err := pRouter.AuthenticatedConnect(parent, "static", pineconeRouter.PeerTypeRemote)
|
||||
_, err := pRouter.AuthenticatedConnect(parent, "static", pineconeRouter.PeerTypeRemote, true)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ func main() {
|
|||
}
|
||||
|
||||
logger := log.New(os.Stdout, "", 0)
|
||||
pRouter := pineconeRouter.NewRouter(logger, sk, "dendrite", nil)
|
||||
pRouter := pineconeRouter.NewRouter(logger, sk, false)
|
||||
|
||||
go func() {
|
||||
listener, err := net.Listen("tcp", *instanceListen)
|
||||
|
@ -108,7 +108,7 @@ func main() {
|
|||
continue
|
||||
}
|
||||
|
||||
port, err := pRouter.AuthenticatedConnect(conn, "", pineconeRouter.PeerTypeRemote)
|
||||
port, err := pRouter.AuthenticatedConnect(conn, "", pineconeRouter.PeerTypeRemote, true)
|
||||
if err != nil {
|
||||
logrus.WithError(err).Error("pSwitch.AuthenticatedConnect failed")
|
||||
continue
|
||||
|
@ -231,7 +231,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
conn := conn.WrapWebSocketConn(c)
|
||||
if _, err = pRouter.AuthenticatedConnect(conn, "websocket", pineconeRouter.PeerTypeRemote); err != nil {
|
||||
if _, err = pRouter.AuthenticatedConnect(conn, "websocket", pineconeRouter.PeerTypeRemote, true); err != nil {
|
||||
logrus.WithError(err).Error("Failed to connect WebSocket peer to Pinecone switch")
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue