Fix race condition exception by checking badge key exists #26
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "cache_invalid_index"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Enabling disk_cache can lead to an exception (invalid_index) when changing channel:
Invalid get index 'badge_sets' (on base 'Dictionary'). (gift_node.gd:525)
We short-circuit the get_badge_mapping (and also, as a side effect, we lower the ciclomatic complexity of the method) so that when there is a missing key the right thing happens.
This way we "return early" in the three cases: if it is cached on memory, if it is cached on disk, or if we have to retrieve it from Twitch/HTTPS.
Fixes #25
Looks good to me. Thanks!