Accurate extraction of coronary arteries from coronary computed tomography angiography (CCTA) is a prerequisite for the computer-aided diagnosis of coronary artery disease (CAD). Deep learning-based methods can achieve automatic segmentation of vasculatures, but few of them focus on the connectivity and completeness of the coronary tree. In this paper, we propose CorSegRec, a topology-preserving scheme for extracting fully-connected coronary artery, which integrates image segmentation, centerline reconnection, and geometry reconstruction. First, we employ a new centerline enhanced loss in the segmentation process. Second, for the broken vessel segments, we propose a regularized walk algorithm, by integrating distance, probabilities predicted by centerline classifier, and cosine similarity to reconnect centerlines. Third, we apply level-set segmentation and implicit modeling techniques to reconstruct the geometric model of the missing vessels. Experiment results on two datasets demonstrate that the proposed method outperforms other methods with better volumetric scores and higher vascular connectivity. Code will be available at https://github.com/YH-Qiu/CorSegRec .