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

fix: close UDP associations once relay is done #238

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Conversation

sbruens
Copy link

@sbruens sbruens commented Feb 10, 2025

No description provided.

@sbruens sbruens requested a review from a team as a code owner February 10, 2025 22:07
}

func (c *association) Close() error {
close(c.readCh)
return c.pc.Close()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who will close the PacketConn?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PacketConn is closed by the listener set:

if err := listenerCloseFunc(); err != nil {

@sbruens sbruens merged commit 35fc25e into master Feb 11, 2025
5 checks passed
@sbruens sbruens deleted the sbruens/udp-sockets2 branch February 11, 2025 01:13
@sbruens sbruens linked an issue Feb 11, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UDP server memory leaking (sockets don't closes on server size)
2 participants