[tor-commits] [tor/maint-0.2.6] Extract main part of main loop into a separate function