Skip to content

Commit

Permalink
fix: Listen to mqtt on a separate thread so we can serve at the same …
Browse files Browse the repository at this point in the history
…time.
  • Loading branch information
andrewjw committed Oct 9, 2020
1 parent e69856d commit 58a0bfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/glowprom
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import threading
import sys

from glowprom import get_arguments, connect, serve, update_stats

def main():
args = get_arguments(sys.argv[1:])

connect(args, update_stats)
threading.Thread(target=connect,
args=(args, update_stats),
daemon=True).start()

serve(args)

Expand Down

0 comments on commit 58a0bfb

Please sign in to comment.