[stats] properly close and free our listener