From 11de2ec42e9fbb5e05eb1854cedea58d6782f118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Wed, 19 Jun 2024 12:18:58 +0200 Subject: [PATCH] Fix open connection --- client/internal/engine.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/internal/engine.go b/client/internal/engine.go index 4efe74cab..2438533a1 100644 --- a/client/internal/engine.go +++ b/client/internal/engine.go @@ -826,7 +826,6 @@ func (e *Engine) addNewPeer(peerConfig *mgmProto.RemotePeerConfig) error { if err != nil { return fmt.Errorf("create peer connection: %w", err) } - conn.Open() e.peerConns[peerKey] = conn if e.beforePeerHook != nil && e.afterPeerHook != nil { @@ -838,6 +837,8 @@ func (e *Engine) addNewPeer(peerConfig *mgmProto.RemotePeerConfig) error { if err != nil { log.Warnf("error adding peer %s to status recorder, got error: %v", peerKey, err) } + + conn.Open() } return nil }