summaryrefslogtreecommitdiff
path: root/examples/pubsub_client.py
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2020-03-23 18:56:22 +0100
committerGeorg Lukas <georg@op-co.de>2020-03-23 18:59:29 +0100
commitd85efec7a245fee045fdd095221ccfa9bd43b58f (patch)
tree43c777033211d1497b643ffbd84c2072a73e5c8c /examples/pubsub_client.py
parent115c234527217bef1adf9e2ce611971d59905d57 (diff)
downloadslixmpp-d85efec7a245fee045fdd095221ccfa9bd43b58f.tar.gz
slixmpp-d85efec7a245fee045fdd095221ccfa9bd43b58f.tar.bz2
slixmpp-d85efec7a245fee045fdd095221ccfa9bd43b58f.tar.xz
slixmpp-d85efec7a245fee045fdd095221ccfa9bd43b58f.zip
reconnect: fix callback when not currently connected
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.
Diffstat (limited to 'examples/pubsub_client.py')
0 files changed, 0 insertions, 0 deletions