JiahengHe 2 jaren geleden
bovenliggende
commit
f25e9d6023
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      strategy/src/quant.rs

+ 2 - 2
strategy/src/quant.rs

@@ -923,7 +923,7 @@ pub async fn run_stratey(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()>{
                         if orders.is_not_empty() {
                             info!("触发onExit");
                             quant._update_local_orders(&orders);
-                            tokio::spawn(async {
+                            tokio::spawn(async move {
                                 platform_rest_fb.command_order(orders).await;
                             });
                         }
@@ -933,7 +933,7 @@ pub async fn run_stratey(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()>{
                         // 记录指令触发信息
                         if orders.is_not_empty() {
                             quant._update_local_orders(&orders);
-                            tokio::spawn(async {
+                            tokio::spawn(async move{
                                 platform_rest_fb.command_order(orders).await;
                             });
                         }