[MM-39428] Check for EBUSY, add retry logic and logging for writing to config (#1845)
This commit is contained in:
@@ -179,7 +179,11 @@ export default class Config extends EventEmitter {
|
||||
try {
|
||||
this.writeFile(this.configFilePath, this.localConfigData, (error: NodeJS.ErrnoException | null) => {
|
||||
if (error) {
|
||||
throw new Error(error.message);
|
||||
if (error.code === 'EBUSY') {
|
||||
this.saveLocalConfigData();
|
||||
} else {
|
||||
this.emit('error', error);
|
||||
}
|
||||
}
|
||||
this.emit('update', this.combinedData);
|
||||
this.emit('synchronize');
|
||||
|
Reference in New Issue
Block a user