Skip to content

Commit

Permalink
fix: problem with bundling mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
Vid201 committed Oct 13, 2023
1 parent e7e3300 commit c611d03
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/grpc/src/bundler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ where
if !self.is_running() {
info!("Starting auto bundling");

let mut r = self.running.lock();
*r = true;
{
let mut r = self.running.lock();
*r = true;
}

for bundler in self.bundlers.iter() {
let bundler_own = bundler.clone();
Expand All @@ -100,10 +102,11 @@ where
tokio::spawn(async move {
let mut interval = tokio::time::interval(Duration::from_secs(int));
loop {
interval.tick().await;

if !is_running(running_lock.clone()) {
break;
}
interval.tick().await;

match Self::get_user_operations(
&uopool_grpc_client,
Expand Down

0 comments on commit c611d03

Please sign in to comment.