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 race condition in handling streams #6

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Mahdi-zarei
Copy link

@Mahdi-zarei Mahdi-zarei commented Dec 11, 2023

Since Stream object was created out of the for loop and it was being used in another goroutine, some race conditions were happening that caused some odd behaviors. For example a nil pointer was occurring on error.go:15 which is quite abnormal.
This pr successfully removes the race condition by initializing the stream object inside the loop and therefore exclusive for each goroutine.

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