Repository navigation
fix: Restart the stream when it sends invalid flag data - #648
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
Generated-by: termag
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The client SDK kept the stream open when a put, patch or delete event held malformed JSON or JSON that did not match the schema, so its flags could stay out of date. It now logs a warning and restarts the stream, as the server SDK already does. In a build with CURL networking, a restart closed the socket of the stream, but CURL does not get a notification when other code closes its socket, so the client could stay without a stream. The CURL SSE client now shuts down the socket instead, so CURL ends the transfer and the client reconnects at once. This also affects the restart in the server SDK with CURL networking.
Testing: Tested on d398077e, before the rebase onto main. New unit tests for malformed and mismatched put, patch and delete events fail before the change and pass after it, with Beast and with CURL. Six harness tests for drop and reconnect change from fail to pass with both. The full contract suites show no other change.
SDK-3658
Opened from termag