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 SqlUtils.WithRetry() to open a new connection if the last attempt closed the connection due to network issues. #221

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

microrama
Copy link
Contributor

Pass the DBCommand to the SqlUtils.WithRetry() method and let the method check the DBCommand connection state and open if needed before attempting the next attempt. This way, we avoid throwing an Error back when there is a intermittent network connectivity issue.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

LGTM!

@cgillum cgillum merged commit 5dbe623 into microsoft:main Jun 3, 2024
2 checks passed
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