diff --git a/Runtime/Rest.cs b/Runtime/Rest.cs index 05250a0..e107f07 100644 --- a/Runtime/Rest.cs +++ b/Runtime/Rest.cs @@ -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); diff --git a/package.json b/package.json index 2ecaa51..1236654 100644 --- a/package.json +++ b/package.json @@ -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",