snowplow / snowplow-unity-tracker

Snowplow event tracker for Unity. Add analytics to your Unity games and apps
http://snowplowanalytics.com
Apache License 2.0
16 stars 11 forks source link

Fix closing threads in AsyncEmitter when exitting app (close #46) #47

Closed matus-tomlein closed 2 years ago

matus-tomlein commented 2 years ago

This PR addresses issue #46 which reported that the AsyncEmitter threads hang after app close on iPhones.

Looking into the issue, I noticed that when waiting for new events in the emitter thread, it doesn't check whether the emitter is still running. So the while loop doesn't exit when emitter stops. This PR fixes the condition in the while loop.