129 end |
129 end |
130 client.stream:hook("stanza", stanza_handler, 100); |
130 client.stream:hook("stanza", stanza_handler, 100); |
131 verse.add_task(client.stanza_timeout or default_stanza_timeout, function () |
131 verse.add_task(client.stanza_timeout or default_stanza_timeout, function () |
132 if expected_stanza then |
132 if expected_stanza then |
133 client.log("TIMEOUT waiting for %s", expected_stanza) |
133 client.log("TIMEOUT waiting for %s", expected_stanza) |
134 error("Timed out waiting for stanza"); |
134 local e = new_error("stanza-timeout", { text = "Timed out waiting for stanza" }); |
|
135 error(e); |
135 end |
136 end |
136 if expected_stanza == false then |
137 if expected_stanza == false then |
137 client.log("Good - no stanzas were received (expected)"); |
138 client.log("Good - no stanzas were received (expected)"); |
138 done(); |
139 done(); |
139 end |
140 end |