Merged requested to merge nickm/tor:ticket40035_035 into maint-0.3.5
Closes #40035 (closed).
Closes #40018 (closed).
I suggest that we try this one out at least in 0.4.4 for a while, since it does solve an older bug in addition to #40018 (closed). We should eventually backport it all the way to 0.3.5.