mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
0ecd9673b8
commit
9d7a450821
@ -25,6 +25,9 @@ var storageModule;
|
||||
var settingsAvailable;
|
||||
var sessionsAvailable;
|
||||
|
||||
var Mutex = require('async-mutex').Mutex;
|
||||
const settingsSaveMutex = new Mutex();
|
||||
|
||||
var libraryFlowsCachedResult = null;
|
||||
|
||||
function moduleSelector(aSettings) {
|
||||
@ -114,7 +117,7 @@ var storageModuleInterface = {
|
||||
},
|
||||
saveSettings: function(settings) {
|
||||
if (settingsAvailable) {
|
||||
return storageModule.saveSettings(settings);
|
||||
return settingsSaveMutex.runExclusive(() => storageModule.saveSettings(settings))
|
||||
} else {
|
||||
return when.resolve();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user