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

com.utilities.rest 3.1.1 #80

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
com.utilities.rest 3.1.1
- fix done event handling
  • Loading branch information
StephenHodgson committed Jun 7, 2024
commit 4c33d12aae2c2b4bc924efdabd219d81f9e5ffa0
5 changes: 3 additions & 2 deletions Utilities.Rest/Packages/com.utilities.rest/Runtime/Rest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,8 +1305,9 @@ void SendServerEventCallback(bool isEnd, string body)
data = match.Groups[nameof(data)].Value;

const string doneTag = "[DONE]";
// if either value or data equals doneTag then stop processing events.
if (value.Equals(doneTag) || data.Equals(doneTag)) { return; }
const string doneEvent = "done";
// if either value or data equals doneTag or doneEvent then stop processing events.
if (value.Equals(doneTag) || data.Equals(doneTag) || value.Equals(doneEvent)) { return; }

var @event = new ServerSentEvent(type);

Expand Down
2 changes: 1 addition & 1 deletion Utilities.Rest/Packages/com.utilities.rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Utilities.Rest",
"description": "This package contains useful RESTful utilities for the Unity Game Engine.",
"keywords": [],
"version": "3.1.0",
"version": "3.1.1",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases",
Expand Down