From 545187dfe5ba3cdb10285df299a87c9e6cfec057 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 8 Apr 2021 16:52:52 +0200 Subject: [PATCH] dont remove peers on a whim it could be they error on the call for a valid reason. TODO: * we need to make an IsConnectionError(err) * maybe level up the gossip.ping code for liveliness. --- muxrpc/handlers/tunnel/server/connect.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/muxrpc/handlers/tunnel/server/connect.go b/muxrpc/handlers/tunnel/server/connect.go index 423edd2..3dd0e8b 100644 --- a/muxrpc/handlers/tunnel/server/connect.go +++ b/muxrpc/handlers/tunnel/server/connect.go @@ -50,11 +50,6 @@ func (h *Handler) connect(ctx context.Context, req *muxrpc.Request, peerSrc *mux targetSrc, targetSnk, err := edp.Duplex(ctx, muxrpc.TypeBinary, muxrpc.Method{"tunnel", "connect"}, argWorigin) if err != nil { - h.state.Remove(arg.Target) - // TODO: the call could fail because of an error with the caller, too. - // if we remove the wrong one, tho others might get confused - // h.state.Remove(caller) - return fmt.Errorf("failed to init connect call with target: %w", err) }