[tor-commits] [tor/master] Fix a number of issues with the #5040 code.