Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: getting more than one connection for Redis channel subscriber #178

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

lauti7
Copy link
Contributor

@lauti7 lauti7 commented Jun 13, 2024

No description provided.

Comment on lines 23 to 27
let connection = if let Some(conn) = redis.get_async_connection().await {
conn
} else {
return Err(RedisChannelSubscriberError::NoConnectionAvailable);
};
Copy link
Contributor

@aleortega aleortega Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we do something like this?

let connection = redis
            .get_async_connection()
            .await
            .map_err(|_| RedisChannelSubscriberError::NoConnectionAvailable)?;

@lauti7 lauti7 merged commit 116e46e into main Jun 13, 2024
3 checks passed
@lauti7 lauti7 deleted the fix/multiple-connections-to-single-one branch June 13, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants