Commit bb3c950
authored
fix: Fix cancelling timeout when waitForInitialization throws an exception (#808)
**Requirements**
- [x] I have added test coverage for new or changed functionality
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [x] I have validated my changes against all supported platform
versions
**Related issues**
https://launchdarkly.atlassian.net/browse/SDK-1132
**Describe the solution you've provided**
Previously the timeout was cancelled in a `then()` and would be skipped
if the base promise threw an exception. The cancelation was moved to
`finally()` where it will always be called regardless of an exception.
**Describe alternatives you've considered**
N/A
**Additional context**
N/A1 parent 85555c7 commit bb3c950
File tree
1 file changed
+9
-7
lines changed1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
| 943 | + | |
944 | 944 | | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
951 | 953 | | |
952 | 954 | | |
953 | 955 | | |
| |||
0 commit comments