Thu, 23 Mar 2023 15:15:01 +0000
client: Fix harmless error logged when calling 'done' too many times
scansion/objects/client.lua | file | annotate | diff | comparison | revisions |
--- a/scansion/objects/client.lua Thu Mar 23 15:13:14 2023 +0000 +++ b/scansion/objects/client.lua Thu Mar 23 15:15:01 2023 +0000 @@ -107,11 +107,15 @@ return true; end client.stream:hook("stanza", stanza_handler, 100); + local finished_waiting; verse.add_task(client.stanza_timeout or default_stanza_timeout, function () - done(); + if not finished_waiting then + done(); + end end); client.stream.conn:resume(); wait(); + finished_waiting = true; if not have_received_stanza then if expected_stanza then