fix: drain tee stream queues in linear time (#2379)