scansion/objects/client.lua

changeset 28
2dd867c31214
parent 27
34d405303242
child 29
9dcdea04601c
equal deleted inserted replaced
27:34d405303242 28:2dd867c31214
68 client.stream:unhook("stanza", stanza_handler); 68 client.stream:unhook("stanza", stanza_handler);
69 done(); 69 done();
70 end 70 end
71 client.stream:hook("stanza", stanza_handler, 100); 71 client.stream:hook("stanza", stanza_handler, 100);
72 verse.add_task(stanza_timeout, function () 72 verse.add_task(stanza_timeout, function ()
73 if not expected_stanza then return; end 73 if not expected_stanza then return; end -- Stanza already received
74 client.log("TIMEOUT waiting for %s", expected_stanza) 74 client.log("TIMEOUT waiting for %s", expected_stanza)
75 error("Timed out waiting for stanza"); 75 error("Timed out waiting for stanza");
76 done(); 76 done();
77 end); 77 end);
78 wait(); 78 wait();

mercurial