Skip to content

Commit

Permalink
Reuse the same connection to load script
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Snaps <[email protected]>
  • Loading branch information
alexsnaps committed Oct 8, 2024
1 parent 789d713 commit 9ec7b63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions limitador/src/storage/redis/redis_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ impl AsyncCounterStorage for AsyncRedisStorage {
.await
{
if err.kind() == ErrorKind::NoScriptError {
self.load_script(SCRIPT_UPDATE_COUNTER).await?;
script.prepare_invoke().load_async(&mut con).await?;
pipeline
.query_async::<()>(&mut con)
.instrument(info_span!("datastore"))
.await?
.await?;
} else {
Err(err)?
Err(err)?;
}
}

Expand Down

0 comments on commit 9ec7b63

Please sign in to comment.