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

Ensure stream position to be reset before returning task #306

Merged
merged 1 commit into from
May 22, 2018

Conversation

ali-ince
Copy link
Contributor

When handling ReadNextMessagesAsync calls, we record message stream buffer position and reset it to that recorded value just after actual read messages operation completes. However, the returned task from ReadNextMessagesAsync call does not include the task continuation that resets the position - and returns the original task. This may sometimes cause the message reading operation resume from an incorrect buffer position which causes an unexpected byte sequence and halts with ProtocolException.

This PR fixes the issue by returning the expeccted position resetting task continuation as the result from ReadNextMessagesAsync method.

@ali-ince ali-ince requested a review from zhenlineo May 22, 2018 09:06
@zhenlineo zhenlineo merged commit 1965594 into neo4j:1.5 May 22, 2018
@ali-ince ali-ince deleted the 1.5-fix-protocol-error branch September 5, 2019 10:43
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.

None yet

2 participants