extract connection_manager_thread