count flushing as channel activity
commit3d9dcb49eb50b6c4681e66c847a320ace1d1c843
authorRoger Dingledine <arma@torproject.org>
Wed, 31 Jan 2018 10:26:06 +0000 (31 05:26 -0500)
committerRoger Dingledine <arma@torproject.org>
Wed, 31 Jan 2018 10:26:06 +0000 (31 05:26 -0500)
treeac222b48b46aa9cc89c62adc882cff5d2228cee9
parent7f2e23e7acc0735e5ae933535a1b617a0860e528
count flushing as channel activity

Stop adding unneeded channel padding right after we finish flushing
to a connection that has been trying to flush for many seconds.
Instead, treat all partial or complete flushes as activity on the
channel, which will defer the time until we need to add padding.

This fix should resolve confusing and scary log messages like
"Channel padding timeout scheduled 221453ms in the past."

Fixes bug 22212; bugfix on 0.3.1.1-alpha.

I think technically we could resolve bug 22212 by adding a call to
channel_timestamp_active() only in the finished_flushing case. But I added
a call in the flushed_some case too since that seems to more accurately
reflect the notion of "active".
changes/bug22212-forreal [new file with mode: 0644]
src/or/connection_or.c