Commit 69dbde1
authored
fix (datafile management): Clear timeout created in onReady method when it's no longer needed (#272)
Summary:
onReady sets a timeout that fulfills a timeout promise. The timeout promise is only used to race against the ready promise provided by ProjectConfigManager. So, as soon as ProjectConfigManager's ready promise is fulfilled, the timeout can be cleared. Before this change, the timeout would only be cleared in the close method.
Test plan:
Manual & added unit test1 parent 057a219 commit 69dbde1
File tree
3 files changed
+43
-0
lines changed- packages/optimizely-sdk
- lib/optimizely
3 files changed
+43
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
939 | 947 | | |
940 | 948 | | |
941 | 949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4831 | 4831 | | |
4832 | 4832 | | |
4833 | 4833 | | |
| 4834 | + | |
| 4835 | + | |
4834 | 4836 | | |
4835 | 4837 | | |
| 4838 | + | |
| 4839 | + | |
4836 | 4840 | | |
4837 | 4841 | | |
4838 | 4842 | | |
| 4843 | + | |
| 4844 | + | |
4839 | 4845 | | |
4840 | 4846 | | |
4841 | 4847 | | |
| |||
4944 | 4950 | | |
4945 | 4951 | | |
4946 | 4952 | | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
| 4956 | + | |
| 4957 | + | |
| 4958 | + | |
| 4959 | + | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
4947 | 4979 | | |
4948 | 4980 | | |
4949 | 4981 | | |
| |||
0 commit comments