Skip to content

Commit

Permalink
unlink() must be after fclose()
Browse files Browse the repository at this point in the history
unlink() cant delete file when is before fclose()
  • Loading branch information
Ozzrell authored and f3l1x committed Jul 20, 2021
1 parent bbf0bde commit ebf2d09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LockingScheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function run(): void
} finally {
// Unlock
flock($fp, LOCK_UN);
unlink($this->path . '/' . $id . '.lock');
fclose($fp);
unlink($this->path . '/' . $id . '.lock');
}
}
}
Expand Down

0 comments on commit ebf2d09

Please sign in to comment.