slixmpp.ClientXMPP.cancel_connection_attempt() does not cancel connection attempt
Executing slixmpp.ClientXMPP.cancel_connection_attempt() does not result in the connection loop to be cancelled. There always ends up a new future being scheduled.
I've been able to fix this by modifying XMLStream._connect_routine(), adding the following 2 lines:
if self._current_connection_attempt is None: return
Once after the:
await asyncio.sleep(self.connect_loop_wait, loop=self.loop)
on line 313
and then also after
on line 328
Simple fix and doing this ensures that if cancel_connection_attempt is called that no new connection is attempted anymore.