Skip to content

Fix bind issue#1

Open
chmurray-cisco wants to merge 1 commit into
pdw-mb:mainfrom
chmurray-cisco:main
Open

Fix bind issue#1
chmurray-cisco wants to merge 1 commit into
pdw-mb:mainfrom
chmurray-cisco:main

Conversation

@chmurray-cisco

Copy link
Copy Markdown

Socket's weren't being closed, so get '[Error 48] Address already in use' when calling more than one API.
e.g.

Found 1 devices
Traceback (most recent call last):
  File "/Users/chmurray/Documents/Dev/t-smart/tsmart/src/parp.py", line 13, in <module>
    asyncio.run(find_devices())
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/Users/chmurray/Documents/Dev/t-smart/tsmart/src/parp.py", line 9, in find_devices
    await device.async_get_status()
  File "/Users/chmurray/Documents/Dev/t-smart/tsmart/src/tsmart/tsmart.py", line 190, in async_get_status
    response = await self._async_request(request, response_struct)
  File "/Users/chmurray/Documents/Dev/t-smart/tsmart/src/tsmart/tsmart.py", line 136, in _async_request
    sock.bind(("", 1337))
OSError: [Errno 48] Address already in use

With fix:


Found 1 devices
Thermostat: MEGAflo T-Smart
Temperature: 22.0°C

Socket's weren't being closed, so get '[Error 48] Address already in use' when calling more than one API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant