Skip to content

Commit

Permalink
Remove reconnect from publish
Browse files Browse the repository at this point in the history
Fixes #43
  • Loading branch information
stlehmann committed Apr 29, 2020
1 parent eb976a3 commit 590730e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 1.1.1 [unreleased]
Expand All @@ -10,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed

### Removed
* [#43](https://github.com/stlehmann/Flask-MQTT/issues/43) Remove reconnect for
publish function. If you want to reconnect to server check the return value for
MQTT_ERR_NO_CONN and call reconnect function.

## 1.1.0
* drop support for Python 2.7 and Python <= 3.5
Expand Down
3 changes: 0 additions & 3 deletions flask_mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,6 @@ def publish(
ID for the publish request.
"""
if not self.connected:
self.client.reconnect()

result, mid = self.client.publish(topic, payload, qos, retain)
if result == MQTT_ERR_SUCCESS:
logger.debug("Published topic {0}: {1}".format(topic, payload))
Expand Down

0 comments on commit 590730e

Please sign in to comment.