core: Move calculate_timeout call to add_to_flying_transfers