From 4be7ada37bcdeadd2cab8a3010fe4f1939d05aa5 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 24 Oct 2018 16:58:06 +0300 Subject: [PATCH] tag relay connections --- p2p/host/relay/autorelay.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/p2p/host/relay/autorelay.go b/p2p/host/relay/autorelay.go index 088a477f3..01451ceb2 100644 --- a/p2p/host/relay/autorelay.go +++ b/p2p/host/relay/autorelay.go @@ -157,6 +157,9 @@ func (h *AutoRelayHost) findRelays(ctx context.Context) { h.relays[pi.ID] = pi h.mx.Unlock() + // tag the connection as very important + h.ConnManager().TagPeer(pi.ID, "relay", 42) + update++ need-- if need == 0 {