Skip to content

fix: Restart the stream when it sends invalid flag data - #648

Draft
kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-3658/client-invalid-stream-restart
Draft

kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-3658/client-invalid-stream-restart

Conversation

@kinyoklion

Copy link
Copy Markdown
Member

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

This branch has not been deployed

No deployments
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