diff options
author | David Goulet <dgoulet@torproject.org> | 2019-06-03 14:31:51 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-06-03 14:31:51 -0400 |
commit | 33382184b67d43b859de2f50d24cc7955b9f0db7 (patch) | |
tree | 81e03745fb038a9d609d6ed2e49178b05cde3288 /src/core | |
parent | 180048e013c06ee67c053186aab46ff94cea0489 (diff) | |
download | tor-33382184b67d43b859de2f50d24cc7955b9f0db7.tar.gz tor-33382184b67d43b859de2f50d24cc7955b9f0db7.zip |
sendme: Do not decrement window in a log_debug()
If "Log debug ..." is not set, the decrement never happens. This lead to the
package/deliver window to be out of sync at the stream level and thus breaking
the connection after 50+ cells.
Fixes #30628
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/sendme.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/or/sendme.c b/src/core/or/sendme.c index 7d409a16ad..47ac95f3cf 100644 --- a/src/core/or/sendme.c +++ b/src/core/or/sendme.c @@ -619,7 +619,9 @@ int sendme_note_stream_data_packaged(edge_connection_t *conn) { tor_assert(conn); - log_debug(LD_APP, "Stream package_window now %d.", --conn->package_window); + + --conn->package_window; + log_debug(LD_APP, "Stream package_window now %d.", conn->package_window); return conn->package_window; } |