We discuss the production of two hadrons in e+e- annihilation within the framework of perturbative QCD. The cross section for this process is calculated to next-to-leading order accuracy with a selection of variables that allows the consideration of events where the two hadrons are detected in the same jet. In this configuration we contemplate the possibility that the hadrons come from a double fragmentation of a single parton. The double-fragmentation functions required to describe the transition of a parton to two hadrons are also necessary to completely factorize all collinear singularities. We explicitly show that factorization applies to next-to-leading order in the case of two-hadron production.