mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 23:05:10 +00:00
[ADD/WIP] Timeouts in stanza awaiting
Querying for a MUC will not take longer than 10 seconds, now.
This commit is contained in:
parent
e4c6994f61
commit
d449c8097e
4 changed files with 52 additions and 12 deletions
|
|
@ -15,7 +15,6 @@ XMPPQueryMUC(XMPPComponent *jabber, char *muc, MUCInfo *out)
|
|||
char *uuid, *from;
|
||||
if (!jabber || !muc)
|
||||
{
|
||||
Log(LOG_WARNING, ":(");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -40,8 +39,9 @@ XMPPQueryMUC(XMPPComponent *jabber, char *muc, MUCInfo *out)
|
|||
StreamFlush(jabber->stream);
|
||||
XMLFreeElement(iq_query);
|
||||
|
||||
/* Except an IQ reply */
|
||||
iq_query = ParseeAwaitStanza(uuid);
|
||||
/* Except an IQ reply. 10 seconds of timeout is pretty
|
||||
* generous, if you ask me. */
|
||||
iq_query = ParseeAwaitStanza(uuid, 10 SECONDS);
|
||||
Free(uuid);
|
||||
if (!iq_query || !StrEquals(iq_query->name, "iq"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue