WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
136 stars 47 forks source link

Fix the error of duplicate signing within multiple threads #85

Open henry42 opened 1 month ago

henry42 commented 1 month ago

Description

If you use the signer or client in multiple threads, updates to the signature may not be locked and generated too frequently, which can result in Apple rejecting it with '429 The provider token is being updated too frequently.' This pull request fixes the issue, albeit in an ugly but effective way.

How Has This Been Tested?

There is a test function named test_signature_caching_in_multithreads.

Due Dilligence