saltedge / saltedge-ios

A handful of classes to help you interact with the Salt Edge API from your iOS app
https://www.saltedge.com
MIT License
1 stars 4 forks source link

Fix concurrent logins fetch with static poll blocks #53

Closed nemesis closed 8 years ago

nemesis commented 8 years ago

Reference: :no_entry_sign:

The issue was that if multiple logins were being requested at the same time, which resulted in them being polled via pollLoginWithSecret: and the context of what login is being refreshed was lost since the static PollLoginBlock was the same between the calls. Also rethought how we notify the delegate with loginStartedFetching: since if multiple logins are being requested at the same time, the static BOOL will only make things worse.