Skip to content

Commit

Permalink
Merge pull request #8512 from tangledbytes/utkarsh/patch/5.16
Browse files Browse the repository at this point in the history
[5.16] fix panic when fh_stat is undefined
  • Loading branch information
nimrod-becker authored Nov 7, 2024
2 parents 81d6b8f + 373b0df commit e58afd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/persistent_logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ class PersistentLogger {

// Don't race with init process - Can happen if arogue/misconfigured
// process is continuously moving the active file
this.init_lock.surround(async () => {
await this.init_lock.surround(async () => {
// If the file has changed, re-init
if (stat.ino !== this.fh_stat.ino) {
if (this.fh_stat && stat.ino !== this.fh_stat.ino) {
dbg.log1('active file changed, closing for namespace:', this.namespace);
await this.close();
}
Expand Down

0 comments on commit e58afd7

Please sign in to comment.