move connection initialization for midgard-portable to prepare_connection and mark it as abstract