StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
621 stars 111 forks source link

[BUG] Error in loop Debug server #526

Closed FeromonDE closed 2 years ago

FeromonDE commented 3 years ago

Environment

Describe the bug

Аfter restarting the integration from integration UI, the log is filled with errors.

Steps to Reproduce

Restart the integration from integration UI. Check home-assistant.log

Expected behavior

Screenshots

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pyShelly/loop.py", line 36, in _start_loop
    self.loop()
  File "/usr/local/lib/python3.8/site-packages/pyShelly/debug.py", line 89, in loop
    connection, client_address = self._socket.accept()
AttributeError: 'NoneType' object has no attribute 'accept'

Additional context

scooper1 commented 3 years ago

this is quite nasty when it occurs - appears to eat memory leading to lockout of home assistant