From 486b31b39a2827f6b5dcc97b5903894fece107a3 Mon Sep 17 00:00:00 2001 From: Chryssa Aliferi Date: Fri, 22 Nov 2024 16:33:10 +0200 Subject: [PATCH] Update RSFlushHandler.cs --- Assets/RudderStack/Unity/Scripts/Helpers/RSFlushHandler.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/RudderStack/Unity/Scripts/Helpers/RSFlushHandler.cs b/Assets/RudderStack/Unity/Scripts/Helpers/RSFlushHandler.cs index 6b12079..7c50f90 100644 --- a/Assets/RudderStack/Unity/Scripts/Helpers/RSFlushHandler.cs +++ b/Assets/RudderStack/Unity/Scripts/Helpers/RSFlushHandler.cs @@ -111,6 +111,10 @@ public void Flush() public async Task FlushAsync() { _timerSemaphore.Release(); + await Task.Run(async () => + { + await FlushImpl(); + }); } private async Task FlushImpl() @@ -239,4 +243,4 @@ public void Dispose() } } -} \ No newline at end of file +}