File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
2.0.0 (September XX, 2024)
2
- - Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory.
3
2
- Added support for targeting rules based on large segments.
3
+ - Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory.
4
+ - Bugfixing - Fixed an issue with the server-side polling manager that caused dangling timers when the SDK was destroyed before it was ready.
4
5
- BREAKING CHANGES:
5
6
- Updated default flag spec version to 1.2.
6
7
- Removed `/mySegments` endpoint from SplitAPI module, as it is replaced by `/memberships` endpoint.
Original file line number Diff line number Diff line change 1
- // http://www.wheresrhys.co.uk/fetch-mock/#usageinstallation
1
+ // @TODO upgrade fetch-mock when fetch-mock-jest vulnerabilities are fixed
2
+ // https://www.wheresrhys.co.uk/fetch-mock/docs/fetch-mock/Usage/cheatsheet#local-fetch-with-jest
2
3
import fetchMockLib from 'fetch-mock' ;
3
4
4
5
const fetchMock = fetchMockLib . sandbox ( ) ;
Original file line number Diff line number Diff line change 1
1
import { splitsSyncTaskFactory } from './syncTasks/splitsSyncTask' ;
2
2
import { segmentsSyncTaskFactory } from './syncTasks/segmentsSyncTask' ;
3
3
import { IPollingManager , ISegmentsSyncTask , ISplitsSyncTask } from './types' ;
4
- import { thenable } from '../../utils/promise/thenable' ;
5
4
import { POLLING_START , POLLING_STOP , LOG_PREFIX_SYNC_POLLING } from '../../logger/constants' ;
6
5
import { ISdkFactoryContextSync } from '../../sdkFactory/types' ;
7
6
@@ -29,9 +28,9 @@ export function pollingManagerSSFactory(
29
28
log . debug ( LOG_PREFIX_SYNC_POLLING + `Segments will be refreshed each ${ settings . scheduler . segmentsRefreshRate } millis` ) ;
30
29
31
30
const startingUp = splitsSyncTask . start ( ) ;
32
- if ( thenable ( startingUp ) ) {
31
+ if ( startingUp ) {
33
32
startingUp . then ( ( ) => {
34
- segmentsSyncTask . start ( ) ;
33
+ if ( splitsSyncTask . isRunning ( ) ) segmentsSyncTask . start ( ) ;
35
34
} ) ;
36
35
}
37
36
} ,
You can’t perform that action at this time.
0 commit comments