shrimpy-python
shrimpy-python copied to clipboard
client.disconnect() not closing gracefully
When client.disconnect() is called, an exception is raised:
Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\theco\AppData\Local\Programs\Python\Python39\lib\threading.py", line 950, in _bootstrap_inner self.run() File "C:\Users\theco\AppData\Local\Programs\Python\Python39\lib\threading.py", line 888, in run self._target(*self._args, **self._kwargs) File "C:\Users\theco\AppData\Local\Programs\Python\Python39\lib\site-packages\shrimpy\shrimpy_ws_client.py", line 92, in _run_socket_thread for task in asyncio.Task.all_tasks(): AttributeError: type object '_asyncio.Task' has no attribute 'all_tasks'
Any help on this?
go to line 92 in "shrimpy_ws_client.py" then change 'asyncio.Task.all_tasks():' to 'asyncio.all_tasks():'
There is use of a deprecated function.