clementprevot / pyduro

A Pypi library to communicate with Aduro (H1) wood/pellet burner via NBE communication
MIT License
11 stars 2 forks source link

Bug: Socket not closed properly #11

Open freol35241 opened 1 year ago

freol35241 commented 1 year ago

I see the following type of warnings in the logs when using pyduro

WARNING py.warnings /usr/local/lib/python3.11/site-packages/pyduro/actions/set.py:45: ResourceWarning: unclosed <socket.socket fd=4, family=2, type=2, proto=0, laddr=('0.0.0.0', 1901)>

Which seems to relate to the fact that the socket that is created in Frame.send does not get properly closed. See: https://docs.python.org/3/library/socket.html#socket.socket.close

victor987 commented 6 days ago

I get similar ones too:

WARNING py.warnings /usr/local/lib/python3.11/site-packages/pyduro/actions/raw.py:38: ResourceWarning: unclosed <socket.socket fd=4, family=2, type=2, proto=0, laddr=('0.0.0.0', 1901)>
response = frame.send(burner_address, verbose=verbose)
WARNING py.warnings /usr/local/lib/python3.11/site-packages/pyduro/actions/get.py:79: ResourceWarning: unclosed <socket.socket fd=4, family=2, type=2, proto=0, laddr=('0.0.0.0', 1901)>
response = frame.send(burner_address, verbose=verbose)