mirror of
https://github.com/fosrl/olm.git
synced 2026-02-23 05:16:45 +00:00
Small adjustments
This commit is contained in:
@@ -471,7 +471,7 @@ func StartTunnel(config TunnelConfig) {
|
||||
// Get existing peer from PeerManager
|
||||
existingPeer, exists := peerManager.GetPeer(updateData.SiteId)
|
||||
if !exists {
|
||||
logger.Error("Peer with site ID %d not found", updateData.SiteId)
|
||||
logger.Warn("Peer with site ID %d not found", updateData.SiteId)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -785,6 +785,13 @@ func StartTunnel(config TunnelConfig) {
|
||||
return
|
||||
}
|
||||
|
||||
// Get existing peer from PeerManager
|
||||
_, exists := peerManager.GetPeer(handshakeData.SiteId)
|
||||
if exists {
|
||||
logger.Warn("Peer with site ID %d already added", handshakeData.SiteId)
|
||||
return
|
||||
}
|
||||
|
||||
exitNode := holepunch.ExitNode{
|
||||
Endpoint: handshakeData.ExitNode.Endpoint,
|
||||
PublicKey: handshakeData.ExitNode.PublicKey,
|
||||
|
||||
Reference in New Issue
Block a user