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:
parent
b939ca0873
commit
545187dfe5
|
@ -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)
|
targetSrc, targetSnk, err := edp.Duplex(ctx, muxrpc.TypeBinary, muxrpc.Method{"tunnel", "connect"}, argWorigin)
|
||||||
if err != nil {
|
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)
|
return fmt.Errorf("failed to init connect call with target: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue