Comparison

plugins/mod_pubsub/pubsub.lib.lua @ 8295:8e82aa858ed2

mod_pubsub: Correct traceback in loop invocation (data is the iterator, does not return one)
author Kim Alvefur <zash@zash.se>
date Sun, 08 Oct 2017 00:35:09 +0200
parent 8219:2e68ae095645
child 8296:e23328adca25
comparison
equal deleted inserted replaced
8294:90576b60f2d0 8295:8e82aa858ed2
356 module:log("error", "Unable to get item: %s", err); 356 module:log("error", "Unable to get item: %s", err);
357 return nil, err; 357 return nil, err;
358 end 358 end
359 -- Workaround for buggy SQL drivers which require iterating until we get a nil. 359 -- Workaround for buggy SQL drivers which require iterating until we get a nil.
360 local id, payload, when, publisher; 360 local id, payload, when, publisher;
361 for a, b, c, d in data() do 361 for a, b, c, d in data do
362 id, payload, when, publisher = a, b, c, d; 362 id, payload, when, publisher = a, b, c, d;
363 end 363 end
364 module:log("debug", "Get item %s (published at %s by %s) from store %s", id, when, publisher, store); 364 module:log("debug", "Get item %s (published at %s by %s) from store %s", id, when, publisher, store);
365 if id == nil then 365 if id == nil then
366 return nil; 366 return nil;