[tor-commits] [onionperf/develop] Restore #40004 fix that got lost during rebase.