diff options
author | David Goulet <dgoulet@torproject.org> | 2019-01-09 11:03:49 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-04-29 12:17:57 -0400 |
commit | 0e6e800c89c7cfef255491179473e13de5f72d03 (patch) | |
tree | ef6485687e1ef21246fb10c6266fb39b60558bc9 /src/core/or/connection_edge.h | |
parent | 8e38791baf48ca2a4c865f3b7fc264392e63f426 (diff) | |
download | tor-0e6e800c89c7cfef255491179473e13de5f72d03.tar.gz tor-0e6e800c89c7cfef255491179473e13de5f72d03.zip |
sendme: Always close stream if deliver window is negative
Previously, we would only close the stream when our deliver window was
negative at the circuit-level but _not_ at the stream-level when receiving a
DATA cell.
This commit adds an helper function connection_edge_end_close() which
sends an END and then mark the stream for close for a given reason.
That function is now used both in case the deliver window goes below zero for
both circuit and stream level.
Part of #26840
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/connection_edge.h')
-rw-r--r-- | src/core/or/connection_edge.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/or/connection_edge.h b/src/core/or/connection_edge.h index 68d8b19a11..e82b6bd765 100644 --- a/src/core/or/connection_edge.h +++ b/src/core/or/connection_edge.h @@ -80,6 +80,7 @@ int connection_edge_process_inbuf(edge_connection_t *conn, int connection_edge_destroy(circid_t circ_id, edge_connection_t *conn); int connection_edge_end(edge_connection_t *conn, uint8_t reason); int connection_edge_end_errno(edge_connection_t *conn); +void connection_edge_end_close(edge_connection_t *conn, uint8_t reason); int connection_edge_flushed_some(edge_connection_t *conn); int connection_edge_finished_flushing(edge_connection_t *conn); int connection_edge_finished_connecting(edge_connection_t *conn); |