pyroute2 icon indicating copy to clipboard operation
pyroute2 copied to clipboard

Socket is not closed in case of PermissionError

Open ffourcot opened this issue 1 year ago • 0 comments

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

ffourcot avatar May 30 '23 12:05 ffourcot