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.
This commit is contained in:
Henry 2021-04-08 16:52:52 +02:00
parent b939ca0873
commit 545187dfe5
1 changed files with 0 additions and 5 deletions

View File

@ -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)
}