slixmpp/slixmpp
Georg Lukas 621255027d Reset reconnect delay on manual reconnect, add delay event
This is just a hotfix workaround for an underlying problem. The
`_connect_routine` code is "blocking" (in an async way) for
`connect_loop_wait` seconds, so that a fresh-started manual reconnect
will be silenty delayed. This code does the following changes:

1. It moves the delay to before the DNS resolution (with the exponential
   back-off it might well be that the DNS records are changed while
   slixmpp is waiting).

2. It adds a new event `reconnect_delay` that gets passed the number of
   seconds it will delay before actually reconnecting

3. It resets the `connect_loop_wait` timer on a manual connect/reconnect
   call to fix the interactive experience.

A *proper fix* would replace the sleep in `_connect_routine` with a
properly timered re-invocation of it, but I don't understand enough of
asyncio for pulling off that magic, and this is actually a proper
improvement. Also I tested this and it works!
2020-03-29 14:21:05 +02:00
..
features Fix authenticating on a non-TLS socket. 2019-01-21 01:02:06 +01:00
plugins XEP-0198: fix race conditions on enable/resume 2020-03-28 21:49:18 +01:00
roster Don’t trigger presence events on MUC presence 2016-08-22 01:29:07 +02:00
stanza basexmpp: Make origin-id opt-out 2019-08-23 17:09:21 +02:00
test Update test framework to work with new filters 2019-12-27 15:27:28 +01:00
thirdparty Merge branch 'develop' of https://github.com/fritzy/SleekXMPP into sleek-merge 2015-10-02 19:00:19 +02:00
util Make the cache encode and decode not crash if something goes wrong 2019-02-02 17:42:24 +01:00
xmlstream Reset reconnect delay on manual reconnect, add delay event 2020-03-29 14:21:05 +02:00
__init__.py Fix compatibility with python 3.5 and 3.6 2018-08-08 23:35:33 +02:00
api.py Rename to slixmpp 2014-07-17 14:19:04 +02:00
basexmpp.py basexmpp: Make origin-id opt-out 2019-08-23 17:09:21 +02:00
clientxmpp.py Switch from @asyncio.coroutine to async def everywhere. 2018-07-01 18:46:33 +02:00
componentxmpp.py Merge branch 'develop' of https://github.com/fritzy/SleekXMPP into sleek-merge 2015-10-02 19:00:19 +02:00
exceptions.py Fix uses of super() in the codebase 2016-09-30 21:25:36 +02:00
jid.py fix a typo in the invalidjid exception name case 2019-08-25 01:42:00 +02:00
stringprep.py stringprep: Make pure-Python punycode() return bytes. 2017-12-27 15:48:42 +01:00
stringprep.pyx Add a function to convert a domain name to punycode. 2015-08-20 20:04:58 +01:00
version.py Release 1.4.2 2019-01-31 14:50:26 +01:00