Skip to content

Conversation

@Tibimac
Copy link
Collaborator

@Tibimac Tibimac commented May 20, 2025

Sometimes, when several requests are made simultaneously, a race condition could cause a crash.
This PR fix this problem and also improve the code by :

  • using the property taskIdentifier to uniquely identify the URLSessionDataTask created
  • removing both the data buffer and the handler from the dictionaries where they're stored when the request complete

@rinov
Copy link
Owner

rinov commented May 30, 2025

Thanks for the fix! Cleaning up the buffers/handlers on completion makes the flow safer and more robust.

@rinov rinov merged commit 38aca3d into rinov:master May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants