Skip to content

Commit

Permalink
fix: crash caused by duplicate configure with worker thread (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyj1991 authored Sep 4, 2023
1 parent f2cd2c3 commit 6c04b07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xprofiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ exports.setConfig = function (config) {
// set config
const { flattern } = configure(config);
configured = true;
xprofiler.configure(flattern);
if (workerThreads.isMainThread) {
xprofiler.configure(flattern);
}

return exports.getXprofilerConfig();
};
Expand Down

0 comments on commit 6c04b07

Please sign in to comment.