Skip to content

Commit c77c50e

Browse files
add logs to waitForPeerUp function (#848)
Signed-off-by: NikitaSkrynnik <[email protected]>
1 parent a7b2adb commit c77c50e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/networkservice/up/peerup/common.go

+2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ func waitForPeerUp(ctx context.Context, vppConn api.Connection, pubKey string, i
8686
for {
8787
select {
8888
case <-ctx.Done():
89+
log.FromContext(ctx).Infof("failed to get any WireguardPeerEvents: %s", ctx.Err())
8990
return errors.Wrap(ctx.Err(), "provided context is done")
9091
case rawMsg := <-watcher.Events():
92+
log.FromContext(ctx).Infof("got WireguardPeerEvent: %v, %v", rawMsg.GetMessageName(), rawMsg.GetMessageType())
9193
if msg, ok := rawMsg.(*wireguard.WireguardPeerEvent); ok &&
9294
msg.PeerIndex == peerIndex &&
9395
msg.Flags&wireguard.WIREGUARD_PEER_ESTABLISHED != 0 {

0 commit comments

Comments
 (0)