1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

fix continous growth of app data in pooled requests (#1609)

fixes #1606
fixes #1607
This commit is contained in:
Rob Ede
2020-07-18 16:17:00 +01:00
committed by GitHub
parent 2fd96c03e5
commit 971ba3eee1
3 changed files with 21 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ use actix_router::{Path, ResourceDef, ResourceInfo, Router, Url};
use actix_service::boxed::{self, BoxService, BoxServiceFactory};
use actix_service::{fn_service, Service, ServiceFactory};
use futures_util::future::{join_all, ok, FutureExt, LocalBoxFuture};
use tinyvec::tiny_vec;
use crate::config::{AppConfig, AppService};
use crate::data::{DataFactory, FnDataFactory};
@@ -245,7 +246,7 @@ where
inner.path.reset();
inner.head = head;
inner.payload = payload;
inner.app_data.push(self.data.clone());
inner.app_data = tiny_vec![self.data.clone()];
req
} else {
HttpRequest::new(