From 38f2a59d1b7b9ef8a13a4cb1d405c5edfbb72556 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Wed, 12 Jun 2024 10:56:21 +0200 Subject: [PATCH] Add comment --- relay/client/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/relay/client/client.go b/relay/client/client.go index d433d4443..4e6e63265 100644 --- a/relay/client/client.go +++ b/relay/client/client.go @@ -142,7 +142,10 @@ func (c *Client) Connect() error { return nil } -// todo: what should happen of call with the same peerID? +// OpenConn create a new net.Conn for the destination peer ID. In case if the connection is in progress +// to the relay server, the function will block until the connection is established or timed out. Otherwise, +// it will return immediately. +// todo: what should happen if call with the same peerID with multiple times? func (c *Client) OpenConn(dstPeerID string) (net.Conn, error) { c.mu.Lock() defer c.mu.Unlock()