Skip to content

Commit

Permalink
Merge pull request #5 from mepla/mepla-patch-1
Browse files Browse the repository at this point in the history
Reconnect on SSLEOFError
  • Loading branch information
mepla authored Jul 3, 2024
2 parents 0954568 + 7b0609e commit db6ab28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homewizard_climate_websocket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__email__ = "soheil.nasirian@gmail.com"
# Do not edit this string manually, always use bumpversion
# Details in CONTRIBUTING.md
__version__ = "0.0.10"
__version__ = "0.0.11"


def get_module_version():
Expand Down
3 changes: 2 additions & 1 deletion homewizard_climate_websocket/ws/hw_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from collections.abc import Callable
from dataclasses import replace
from enum import Enum
from ssl import SSLEOFError

import websocket
from websocket._exceptions import WebSocketConnectionClosedException
Expand Down Expand Up @@ -108,7 +109,7 @@ def _send_message(self, payload: str) -> None:
)
try:
self._socket_app.send(payload)
except WebSocketConnectionClosedException:
except (WebSocketConnectionClosedException, SSLEOFError):
self._auto_reconnect_if_needed()

def turn_on(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.10
current_version = 0.0.11
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@
url="https://github.com/mepla/homewizard_climate_websocket",
# Do not edit this string manually, always use bumpversion
# Details in CONTRIBUTING.rst
version="0.0.10",
version="0.0.11",
zip_safe=False,
)

0 comments on commit db6ab28

Please sign in to comment.