relay: Send back CONNECTION_REFUSED on reentry
commit387d1d8835df1bffa71e5157c41cb856c5f18d7d
authorDavid Goulet <dgoulet@torproject.org>
Mon, 1 Feb 2021 17:45:32 +0000 (1 12:45 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 1 Feb 2021 17:45:32 +0000 (1 12:45 -0500)
tree100c10a61ee3e890c6db0addbbf73f962199a3dd
parent838e07be9dc88d41da39a1b4b6b445f67309b108
relay: Send back CONNECTION_REFUSED on reentry

The TORPROTOCOL reason causes the client to close the circuit which is not
what we want because other valid streams might be on it.

Instead, CONNECTION_REFUSED will leave it open but will not allow more streams
to be attached to it. The client then open a new circuit to the destination.

Closes #40270

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/core/or/connection_edge.c