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 races to c.Session() and c.SecureChannel() #654

Merged
merged 2 commits into from
May 25, 2023

Conversation

magiconair
Copy link
Member

In these cases the method calls c.SecureChannel and/or c.Session multiple times and during a re-connect the returned value can change. This patch addresses this by storing the returned value in a local variable.

Fixes #640

In these cases the method calls c.SecureChannel and/or c.Session multiple
times and during a re-connect the returned value can change. This patch
addresses this by storing the returned value in a local variable.

Fixes #640
@magiconair
Copy link
Member Author

@bitomaxsp could you have a look please?

client.go Show resolved Hide resolved
@magiconair magiconair requested a review from bitomaxsp May 25, 2023 12:06
@magiconair magiconair added this to the v0.3.15 milestone May 25, 2023
@magiconair magiconair merged commit 0b5ef64 into main May 25, 2023
@magiconair magiconair deleted the issue-640-panic-in-secure-channel branch May 25, 2023 12:09
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.

Panic in secure_channel.go
2 participants