Skip to content

Commit

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


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 @@ -50,7 +54,6 @@ 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 bfb203b

Please sign in to comment.