Skip to content

Commit

Permalink
Try fix for uncloed connection during Moxa discover
Browse files Browse the repository at this point in the history
  • Loading branch information
ankohanse committed Dec 23, 2024
1 parent 46aad5d commit 6a28abc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "aioxcom"
version = "1.6.2"
version = "1.6.3"
authors = [
{ name="Anko Hanse", email="[email protected]" },
]
Expand Down
4 changes: 2 additions & 2 deletions src/aioxcom/xcom_discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def discoverMoxaWebConfig(hint: str = None) -> str:

# Define helper function to check for Moxa Web Config page
async def check_url(session, url:str) -> str|None:
_LOGGER.debug(f"trying {url}")
_LOGGER.info(f"trying {url}")
async with session.get(url) as rsp:
if rsp and rsp.ok and rsp.headers.get("Server", "").startswith("Moxa"):
return url
Expand All @@ -209,7 +209,7 @@ async def check_url(session, url:str) -> str|None:
for other_task in tasks:
other_task.cancel()

_LOGGER.debug(f"Found Moxa Web Config url: {url}")
_LOGGER.info(f"Found Moxa Web Config url: {url}")
return url
except:
pass
Expand Down

0 comments on commit 6a28abc

Please sign in to comment.