From 15cea7e9fa9830b2e5845598029f45cdf2ee58ea Mon Sep 17 00:00:00 2001 From: Nicolas Jouanin Date: Sat, 29 Aug 2015 21:19:38 +0200 Subject: [PATCH] Fix exception when connection is refused --- hbmqtt/client.py | 1 - samples/passwd | 0 2 files changed, 1 deletion(-) create mode 100644 samples/passwd diff --git a/hbmqtt/client.py b/hbmqtt/client.py index 158db7f..d4fb60f 100644 --- a/hbmqtt/client.py +++ b/hbmqtt/client.py @@ -277,7 +277,6 @@ class MQTTClient: raise ClientException("connection Failed: %s" % e) if return_code is not CONNECTION_ACCEPTED: - yield from self._handler.stop() self.session.transitions.disconnect() self.logger.warn("Connection rejected with code '%s'" % return_code) exc = ConnectException("Connection rejected by broker") diff --git a/samples/passwd b/samples/passwd new file mode 100644 index 0000000..e69de29