fix(core): handle concurrent saving for the file
this is very hacky, but idk how to make it better.
This commit is contained in:
parent
f3e4a34eab
commit
977527b78a
1 changed files with 2 additions and 2 deletions
|
@ -86,8 +86,8 @@ export class JsonFileStorage extends JsonMemoryStorage {
|
|||
fs.rename(
|
||||
this._filename + '.tmp',
|
||||
this._filename,
|
||||
(err?: Error) => {
|
||||
if (err) reject(err)
|
||||
(err?: any) => {
|
||||
if (err && err.code !== 'ENOENT') reject(err)
|
||||
else resolve()
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue