pyroute2
pyroute2 copied to clipboard
Socket is not closed in case of PermissionError
Hello,
It's probably not an important bug, but when something does not work on a new IPRoute instance, we are not able to close the associated socket.
Simplest way to reproduce, just call IPRoute(all_ns=True)
as standard user in python shell.
I think that when one of the setsockopt is failing, we should close the socket