Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclosed socket in utils #6795

Closed
maxnoe opened this issue Jun 3, 2024 · 0 comments · Fixed by #6796
Closed

Unclosed socket in utils #6795

maxnoe opened this issue Jun 3, 2024 · 0 comments · Fixed by #6796
Assignees
Milestone

Comments

@maxnoe
Copy link
Contributor

maxnoe commented Jun 3, 2024

Description

Follow up to #6787, a similar resource leak due to not using context managers for resource objects. In this case, a socket.

Steps to reproduce

The two sockets here:

❯ rg -F 'socket(socket.AF_INET'
lib/rucio/common/utils.py
1233:        s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
1241:            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

are opened but never closed.

Rucio Version

Current master and older

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants