fixed stream test not disconnecting cleanly
This commit is contained in:
parent
aeb7999e6a
commit
95ad8a1878
2 changed files with 2 additions and 3 deletions
|
@ -174,8 +174,7 @@ class ClientXMPP(BaseXMPP):
|
|||
|
||||
if not address:
|
||||
# If all else fails, use the server from the JID.
|
||||
address = (self.server, 5222)
|
||||
logging.debug("The server is %s" % self.server)
|
||||
address = (self.boundjid.host, 5222)
|
||||
|
||||
return XMLStream.connect(self, address[0], address[1], use_tls=True)
|
||||
|
||||
|
|
|
@ -638,8 +638,8 @@ class SleekTest(unittest.TestCase):
|
|||
that the XMPP client is disconnected after an error.
|
||||
"""
|
||||
if hasattr(self, 'xmpp') and self.xmpp is not None:
|
||||
self.xmpp.disconnect()
|
||||
self.xmpp.socket.recv_data(self.xmpp.stream_footer)
|
||||
self.xmpp.disconnect()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# XML Comparison and Cleanup
|
||||
|
|
Loading…
Reference in a new issue