Age | Commit message (Collapse) | Author |
|
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
|
|
It will set a disposable handler on an event and wait on it with a
specific timeout. Useful for integration tests without callback hell.
|
|
|
|
Due to the send queue, messages sent immediatly before calling
"disconnect" would not be sent.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
to avoid killing the send loop when a filter has an error
|
|
|
|
To be able to run async stream filters
|
|
This reverts commit 37bc1bb9b3bdc26b7f28b30406d1013f9b0f6ceb.
Confusion confusion. Mathieui thought this was a sleekxmpp thing when
it's actually been added not so long ago.
|
|
even if the user makes that mistake, it does not cause problems down the
line.
|
|
Fix long-standing security issues where stanza @id be predictable.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
True is passed. Update documentation
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
which do not have loop.start_tls and require the old ssl implementation.
|
|
Use the "new" sslproto API instead of the deprecated TLS API.
Also remove the unused "socket" parameter in XMLStream.__init__.
|
|
|
|
move to asyncio.ensure_future
|
|
|
|
It does not make sense to have competing connection attempts, as the
XMLStream class is not designed for this. On slow and unpredictable
networks, it means we could have two c2s connections opened, leading to
mayhem.
|
|
It’s slow and makes the debug logs difficult to parse.
|
|
|