close channel periodically to prevent gc issues