Software / code / prosody
Comparison
plugins/mod_storage_internal.lua @ 13343:9a9455de295d
mod_storage_internal: Only close lazy-loading list store abstractions
Since datamanager can fall back to the old method of loading the whole
list, which wouldn't come with a :close method.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 26 Nov 2023 14:29:08 +0100 |
| parent | 13340:92b7ccc76c3a |
| child | 13344:958c759d3897 |
comparison
equal
deleted
inserted
replaced
| 13342:d0a9b631a937 | 13343:9a9455de295d |
|---|---|
| 256 end | 256 end |
| 257 | 257 |
| 258 return function() | 258 return function() |
| 259 local item = iter(); | 259 local item = iter(); |
| 260 if item == nil then | 260 if item == nil then |
| 261 list:close(); | 261 if list.close then |
| 262 list:close(); | |
| 263 end | |
| 262 return | 264 return |
| 263 end | 265 end |
| 264 local key = item.key; | 266 local key = item.key; |
| 265 local when = item.when or item.attr and datetime.parse(item.attr.stamp); | 267 local when = item.when or item.attr and datetime.parse(item.attr.stamp); |
| 266 local with = item.with; | 268 local with = item.with; |