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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user