mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-17 01:17:29 +02:00
chore: when some promise fails others might hang and leave open conns (#6636)
This was identified during some tests where we noticed jest did not complete properly (notice how after linking unleash-server to this commit it didn't have that issue): 
This commit is contained in:
parent
a30ddd81c5
commit
783c83173f
@ -107,6 +107,7 @@ import type { FeatureToggleInsert } from './feature-toggle-store';
|
||||
import ArchivedFeatureError from '../../error/archivedfeature-error';
|
||||
import { FEATURES_CREATED_BY_PROCESSED } from '../../metric-events';
|
||||
import type { EventEmitter } from 'stream';
|
||||
import { allSettledWithRejection } from '../../util/allSettledWithRejection';
|
||||
|
||||
interface IFeatureContext {
|
||||
featureName: string;
|
||||
@ -1717,7 +1718,7 @@ class FeatureToggleService {
|
||||
user?: IUser,
|
||||
shouldActivateDisabledStrategies = false,
|
||||
): Promise<void> {
|
||||
await Promise.all(
|
||||
await allSettledWithRejection(
|
||||
featureNames.map((featureName) =>
|
||||
this.updateEnabled(
|
||||
project,
|
||||
|
Loading…
Reference in New Issue
Block a user