Skip to content

Commit

Permalink
fix: Make thread not global
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L committed Oct 3, 2023
1 parent 13220a5 commit f13b9bd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions roborock/cloud_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import asyncio
import base64
import logging
import threading
import uuid
from asyncio import Lock, Task
from typing import Any
Expand All @@ -26,9 +25,6 @@


class RoborockMqttClient(RoborockClient, mqtt.Client):
_thread: threading.Thread
_client_id: str

def __init__(self, user_data: UserData, device_info: DeviceData, queue_timeout: int = 10) -> None:
rriot = user_data.rriot
if rriot is None:
Expand All @@ -54,6 +50,7 @@ def __init__(self, user_data: UserData, device_info: DeviceData, queue_timeout:
self._waiting_queue: dict[int, RoborockFuture] = {}
self._mutex = Lock()
self.update_client_id()
self._thread = None

def on_connect(self, *args, **kwargs):
_, __, ___, rc, ____ = args
Expand Down

0 comments on commit f13b9bd

Please sign in to comment.