-
Notifications
You must be signed in to change notification settings - Fork 164
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 issue of potentially dropped messages in subscription #279
Conversation
I think you still need to handle the case of |
@pekkah Hmmm i am not sure if SendAsync actually returns a boolean as seen below:
I understand that underlying it is using ActionBlock.SendAsync, which provides a boolean return value. However upon reading the documentations and examples, there are plenty of results that point to the fact that it should not return false unless the block completes or fails On the event of a failure (SendAsync returns false):
Retries could be possible, however that would require passing in some sort of configuration from the root 3 levels into the Subscriptions class if we do not want to hard code the retry count |
I made a small tweak to help with handling errors and terminating the subscription |
@pekkah Are you able to take a look at the change and see if there are any more changes required? |
These changes should not be necessary in version 7 of GraphQL.Server |
Fixed and refactored code to utilize async APIs, without using Task.Wait(), which potentially creates deadlocks. I have tested this to work in my project