heroiclabs / nakama-unity

Unity client for Nakama server.
https://heroiclabs.com/docs/unity-client-guide
Other
407 stars 75 forks source link

only call dispose after www is guaranteed to be done getting used #147

Closed lugehorsam closed 1 year ago

lugehorsam commented 1 year ago

If a user cancelled a Unity web request with a cancellation token, there was a chance that the web request would have Dispose() called on it while it was still being used in the request coroutine. This leads to runtime exceptions.

This should resolve the issue by only disposing www in the coroutine instead of the task continuation.