pyduro
pyduro copied to clipboard
Bug: Socket not closed properly
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
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)