summaryrefslogtreecommitdiff
path: root/slixmpp/xmlstream
AgeCommit message (Collapse)Author
2020-03-23reconnect: fix callback when not currently connectedGeorg Lukas
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.
2019-12-27Put the queue exception at toplevelmathieui
2019-12-27Improve the send queue code a bitmathieui
2019-12-27add a separate place for slow ass filtersmathieui
2019-12-27raise Exceptionmathieui
2019-12-27Try/except around outbound stanza processingmathieui
to avoid killing the send loop when a filter has an error
2019-12-27Remove trailing whitespacemathieui
2019-12-27Run the send queue in a separate coroutinemathieui
To be able to run async stream filters
2019-08-28Revert "Remove a block of compatibility code"Maxime “pep” Buquet
This reverts commit 37bc1bb9b3bdc26b7f28b30406d1013f9b0f6ceb. Confusion confusion. Mathieui thought this was a sleekxmpp thing when it's actually been added not so long ago.
2019-08-26Remove a block of compatibility codemathieui
even if the user makes that mistake, it does not cause problems down the line.
2019-07-16xmlstream/stanzabase: remove unused interfaces and types attributesMaxime “pep” Buquet
These are already on each stanza, and were not applicable to all stanzas anyway. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-07-13Make generated stanza id truly randomMaxime “pep” Buquet
Fix long-standing security issues where stanza @id be predictable. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-07-03xmlstream.disconnect: add compat behaviour, set wait to default `2.0` when ↵Maxime “pep” Buquet
True is passed. Update documentation Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-04-24xmlstream.disconnect: fix frenchism in docstringMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-04-24xmlstream.disconnect: typing hintsMaxime “pep” Buquet
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-03-26mark end-of-stream as session-ending eventGeorg Lukas
2019-03-26Do not directly enqueue connect() as event handler, parameter mismatchGeorg Lukas
2019-03-26Do not close stream on 0-timeout disconnect, allows 0198 resumeGeorg Lukas
2019-03-26Propagate disconnect() reason into 'disconnected' eventGeorg Lukas
2019-02-22Fix slixmpp.ClientXMPP.cancel_connection_attempt()ehendrix23
2019-01-09Simplify the non-CDATA path of tostring.escape.Emmanuel Gil Peyrot
2019-01-09Split ns only once in fix_ns().Emmanuel Gil Peyrot
2019-01-09Split tag and attrib only once in tostring().Emmanuel Gil Peyrot
2018-10-15fixing deprecation warnings for pytestFlorian Klien
2018-10-09Add the loop parameters at places where it has been forgottenmathieui
2018-10-03stanzabase: Remove python2 legacy.Emmanuel Gil Peyrot
2018-08-08Fix compatibility with python 3.5 and 3.6mathieui
which do not have loop.start_tls and require the old ssl implementation.
2018-08-07Fix TLS with python 3.7mathieui
Use the "new" sslproto API instead of the deprecated TLS API. Also remove the unused "socket" parameter in XMLStream.__init__.
2018-07-02Fix missing async def in function.Emmanuel Gil Peyrot
2018-07-01Switch from @asyncio.coroutine to async def everywhere.Emmanuel Gil Peyrot
2018-02-11asyncio.async has been scheduled for removal for a long time nowmathieui
move to asyncio.ensure_future
2018-01-10Fix typos, thanks `codespell`!Emmanuel Gil Peyrot
2017-11-23Record the current connection attempt in a future and allow cancellationmathieui
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.
2017-07-17xmlstream: Remove pygments dumping.Emmanuel Gil Peyrot
It’s slow and makes the debug logs difficult to parse.
2017-05-24always define ssl_contextMathias Ertl
2017-05-24pass SSL context to TLS connectionsMathias Ertl
2017-05-24add function to explicitly get the ssl contextMathias Ertl
2017-05-16Merge remote-tracking branch 'samwhited/sslsocket_workaround'louiz’
2017-05-08Fixes port being set to 0 when connecting via hostname.Tom Wambold
This seems to be the same issue as: https://dev.louiz.org/issues/3164 Using their suggested fix, if the DNS lookup doesn't return a port, use the one passed in instead.
2017-02-16xmlstream: Warn when the parser is None when data is received.Emmanuel Gil Peyrot
2016-12-29Check for XML parsing errors and disconnect in that case.WIPEmmanuel Gil Peyrot
2016-12-29XMLStream: Break a long line to make it more readable.Emmanuel Gil Peyrot
2016-10-23Transform an if into an elif in cert parsing.Emmanuel Gil Peyrot
2016-10-22sed -i 's/set(\[\(.*\)\])$/{\1}/g' **/*.pyEmmanuel Gil Peyrot
2016-10-22sed -i 's/set((\(.*\)))$/{\1}/g' **/*.pyEmmanuel Gil Peyrot
2016-10-22sed -i 's/set((\(.*\),))$/{\1}/g' **/*.pyEmmanuel Gil Peyrot
2016-10-06Fix fetching the SSL socket for Python 3.4 and 3.5Sam Whited
2016-10-05Remove monkeypatching hack on the event loopmathieui
This allowed us to schedule events in-order later in the event loop, but was detrimental to using other event loops and debugging.
2016-10-02Add a fallback if the lang we want is not availablemathieui
Previously, trying to get a text node with a lang which is different from the one we specified would return nothing, which means e.g. a message would be ignored because its body is of lang 'fr' when we setup slixmpp to prefer 'en'. We want to return something when there is an available, valid content in a different language.
2016-09-30Fix #3226 (unicity of scheduled event names)mathieui
Thanks tchiroux for raising the issue and providing the fix as well.