Skip to content

Commit

Permalink
com.utilities.rest 3.1.1 (#80)
Browse files Browse the repository at this point in the history
- fix done event handling
  • Loading branch information
StephenHodgson committed Jun 7, 2024
1 parent 5cb482f commit 91de28f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 91de28f

Please sign in to comment.