Skip to content

Commit 6fbfe33

Browse files
committed
init wrapper in multiton
1 parent a2bab65 commit 6fbfe33

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/wrapper/CxWrapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class CxWrapper {
5656
if (!wrapper) {
5757
wrapper = new CxWrapper(cxScanConfig, logFilePath);
5858
CxWrapper.instances.set(key, wrapper);
59+
await wrapper.init();
5960
}
6061
release();
6162

src/main/wrapper/CxWrapperFactory.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ export interface ICxWrapperFactory {
88

99
class CxWrapperFactory implements ICxWrapperFactory {
1010
async createWrapper(cxScanConfig: CxConfig, logFilePath?: string): Promise<CxWrapper> {
11-
const wrapper = await CxWrapper.getInstance(cxScanConfig, logFilePath);
12-
await wrapper.init();
13-
return wrapper;
11+
return await CxWrapper.getInstance(cxScanConfig, logFilePath);;
1412
}
1513
}
1614

0 commit comments

Comments
 (0)