Skip to content

Commit

Permalink
fix continous growth of app data in pooled requests
Browse files Browse the repository at this point in the history
fixes #1606
fixes #1607
  • Loading branch information
robjtede committed Jul 18, 2020
1 parent 2fd96c0 commit a75dbc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app_service.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit a75dbc2

Please sign in to comment.