Mercurial > hg
changeset 706:934fddc99592
Check for IQ requests timeouts
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 18 Feb 2006 15:07:51 +0100 |
parents | 603b43e4f56a |
children | b26a0bde4cdb |
files | mcabber/src/jabglue.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Sat Feb 18 15:04:17 2006 +0100 +++ b/mcabber/src/jabglue.c Sat Feb 18 15:07:51 2006 +0100 @@ -170,6 +170,9 @@ void jb_main() { + time_t now; + static time_t last_iqs_check = 0; + if (!online) { safe_usleep(10000); return; @@ -211,10 +214,16 @@ statehandler(jc, JCONN_STATE_OFF); } + time(&now); + + // Check for IQ requests timeouts + if (now > last_iqs_check + 20) { + iqs_check_timeout(now); + last_iqs_check = now; + } + // Keepalive if (KeepaliveDelay) { - time_t now; - time(&now); if (now > LastPingTime + KeepaliveDelay) jb_keepalive(); }