Age | Commit message (Collapse) | Author |
|
each sent stanza should be purged, obviously…
|
|
- wrong attribute used
- some mistakes in the slow tasks function
|
|
|
|
This was very much broken on plugin iterables and other reasons.
|
|
fix #3464
|
|
xmlstream: do not allow stanzas outside a session
See merge request poezio/slixmpp!154
|
|
|
|
except for the bind, obviously
|
|
|
|
Essentially stream feature handlers which can then make sure the feature
has been process correctly (e.g. 0077).
This is the same approach as slixmpp!4.
|
|
Deprecated in 3.8, removed in 3.10
|
|
|
|
it is the only way I know of checking if an element is present in a
stanza without creating it or checking the XML manually.
|
|
|
|
|
|
|
|
It has been removed years ago.
|
|
|
|
That value should be set statically. Worst case is we fail to resume the
session.
|
|
|
|
|
|
leave it to the connection_lost handler
|
|
|
|
|
|
|
|
* use asyncio wait_for to wait for a disconnected event
* abort the connection if the timeout is not enough
|
|
and keep track of slow tasks
|
|
it does not make sense to cancel it, it does not do anything when the
sending queue is empty, and clients should not fill the send queue when
not connected anyway.
|
|
|
|
and handle other loops properly
|
|
|
|
Otherwise we could end up reconnecting and getting some useful things
like the XML parser or other stuff removed afterwards.
Also, move 'session_end' before 'disconnected', it makes more sense that
way.
|
|
Remove most references to timeout/callback/ifrom/timeout_callbacks args
|
|
Remove usage of OrderedDict
See merge request poezio/slixmpp!77
|
|
We now support only Python 3.7+, this means we can rely on dict being
ordered by order of insertion, and thus no need to use OrderedDict from
collections.
|
|
It will set a disposable handler on an event and wait on it with a
specific timeout. Useful for integration tests without callback hell.
|
|
This is a shortcut to avoid defining custom methods each time a
substanza containing a JID exists in a plugin.
Same thing with attributes, there is no place where we do not want this.
|
|
Cancel run_filters task upon disconnect
See merge request poezio/slixmpp!57
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
|
|
Due to the send queue, messages sent immediatly before calling
"disconnect" would not be sent.
|
|
When deleting sub-elements in a stanza.
|
|
cElementTree has been deprecated since Python 3.3 and removed in Python 3.9.
See merge request poezio/slixmpp!38
|
|
|
|
|
|
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!
|
|
|
|
The 'disconnected' event is normally fired from connection_lost(), which
is called by the connection code when the connection is lost after being
established. However, if the connection wasn't successfully established,
a manual /reconnect no-ops because it waits for the 'disconnected'
callback which never fires. This patch does two things:
1. Immediately fire a 'disconnected' event in disconnect() if there is
no transport.
2. Register the 'disconnected' event handler in reconnect() *before* it
can be fired.
|
|
|
|
|