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 of dataPromise and responseReceived(fix #16) #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karino2
Copy link

@karino2 karino2 commented Jul 29, 2024

This is the cause of "window size reached" bug.
If responseReceived thread is suspended when dataPromise.succeed call, and another thread which waked up by dataPromisss.succeed call reciveData again, that second call create dataPromise promise. Then resume responseRecived thread clear dataPromise property without calling succeed, which cause forever waiting.

In this fix, dataPromise and cachedRecivedData is isolated by actor and access only from the same actor context.

)

This is the cause of "window size reached" bug.
If responseReceived thread is suspended when dataPromise.succeed call, and another thread which waked up by dataPromisss.succeed call reciveData again,
that second call create dataPromise promise. Then resume responseRecived thread clear dataPromise property without calling succeed, which cause forever waiting.

In this fix, dataPromise and cachedRecivedData is isolated by actor and access only from the same actor context.
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.

1 participant