aboutsummaryrefslogtreecommitdiffstats
path: root/util/datamanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-02-25 22:36:42 +0100
committerKim Alvefur <zash@zash.se>2016-02-25 22:36:42 +0100
commit989cb458a289427d0d8f92354329bbdbcc2f7c6d (patch)
treec8f4dd4f6fb8b9015d34dde21ed0cf37e66362b2 /util/datamanager.lua
parent6c642c96b505263c1b95513108e81ba72d37c152 (diff)
downloadprosody-989cb458a289427d0d8f92354329bbdbcc2f7c6d.tar.gz
prosody-989cb458a289427d0d8f92354329bbdbcc2f7c6d.zip
util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes #632)
Diffstat (limited to 'util/datamanager.lua')
-rw-r--r--util/datamanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index a107d95c..c69ecd25 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -152,6 +152,7 @@ local function atomic_store(filename, data)
if not ok then break end
ok, msg = f:close();
+ f = nil; -- no longer valid
if not ok then break end
return os_rename(scratch, filename);