diff --git a/core/class/jsondb/JsonDb.class.php b/core/class/jsondb/JsonDb.class.php index cff3bf40..eb08a26a 100644 --- a/core/class/jsondb/JsonDb.class.php +++ b/core/class/jsondb/JsonDb.class.php @@ -18,9 +18,9 @@ class JsonDb extends \Prowebcraft\Dot protected $db = ''; protected $data = null; protected $config = []; -// Tentative d'encodage après échec + // Tentative d'encodage après échec const MAX_JSON_ENCODE_ATTEMPTS = 5; -// Tentative d'écriture après échec + // Tentative d'écriture après échec const MAX_FILE_WRITE_ATTEMPTS = 5; // Délais entre deux tentaives const RETRY_DELAY_SECONDS = 1; @@ -193,8 +193,11 @@ class JsonDb extends \Prowebcraft\Dot fclose($lockHandle); return false; } - + // Supprimer le fichier de verrouillage + if (file_exists($lockFile)) { + unlink($lockFile); + } return true; } - + } \ No newline at end of file