relay: Send back CONNECTION_REFUSED on reentry
commit59f1a41a7fdc03f5008e859e7e56e9c159b8a8d9
authorDavid Goulet <dgoulet@torproject.org>
Mon, 1 Feb 2021 17:45:32 +0000 (1 12:45 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 3 Feb 2021 13:52:48 +0000 (3 08:52 -0500)
tree95b6717056ef15224582fe5959d8e2c3920d2fa5
parent98590621bb49cbecd601085f7e03697f8783ff7b
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