mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
fix: wrong peer key addressing
This commit is contained in:
@@ -87,7 +87,7 @@ func (e *Engine) Start(privateKey string, peers []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
conn := NewConnection(*connConfig, signalCandidate, signalOffer, signalAnswer)
|
conn := NewConnection(*connConfig, signalCandidate, signalOffer, signalAnswer)
|
||||||
e.conns[myPubKey] = conn
|
e.conns[remoteKey.String()] = conn
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
err = conn.Open()
|
err = conn.Open()
|
||||||
@@ -142,7 +142,7 @@ func (e *Engine) receiveSignal(localKey string) {
|
|||||||
// connect to a stream of messages coming from the signal server
|
// connect to a stream of messages coming from the signal server
|
||||||
e.signal.Receive(localKey, func(msg *sProto.Message) error {
|
e.signal.Receive(localKey, func(msg *sProto.Message) error {
|
||||||
|
|
||||||
conn := e.conns[msg.RemoteKey]
|
conn := e.conns[msg.Key]
|
||||||
if conn == nil {
|
if conn == nil {
|
||||||
return fmt.Errorf("wrongly addressed message %s", msg.Key)
|
return fmt.Errorf("wrongly addressed message %s", msg.Key)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user