Revert "Remove a block of compatibility code"

This reverts commit 37bc1bb9b3.

Confusion confusion. Mathieui thought this was a sleekxmpp thing when
it's actually been added not so long ago.
This commit is contained in:
Maxime “pep” Buquet 2019-08-28 00:12:10 +02:00
parent 37bc1bb9b3
commit db13794e0f

View file

@ -468,6 +468,13 @@ class XMLStream(asyncio.BaseProtocol):
:param wait: Time to wait for a response from the server. :param wait: Time to wait for a response from the server.
""" """
# Compat: docs/getting_started/sendlogout.rst has been promoting
# `disconnect(wait=True)` for ages. This doesn't mean anything to the
# schedule call below. It would fortunately be converted to `1` later
# down the call chain. Praise the implicit casts lord.
if wait == True:
wait = 2.0
self.disconnect_reason = reason self.disconnect_reason = reason
self.cancel_connection_attempt() self.cancel_connection_attempt()
if self.transport: if self.transport: