Skip to content

Fix memory leak on connection close#75

Open
kurochan wants to merge 1 commit intoHaivision:masterfrom
kurochan:fix-bug-closing-connection
Open

Fix memory leak on connection close#75
kurochan wants to merge 1 commit intoHaivision:masterfrom
kurochan:fix-bug-closing-connection

Conversation

@kurochan
Copy link

@kurochan kurochan commented Oct 7, 2024

No description provided.

s.pd.close()
}
callbackMutex.Lock()
if ptr, exists := listenCallbackMap[s.socket]; exists {
Copy link
Author

Choose a reason for hiding this comment

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

s.socket is always SRT_INVALID_SOCK

if ptr, exists := listenCallbackMap[s.socket]; exists {
if ptr, exists := listenCallbackMap[socket]; exists {
gopointer.Unref(ptr)
delete(listenCallbackMap, socket)
Copy link
Author

Choose a reason for hiding this comment

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

Also need to delete from map

@kurochan
Copy link
Author

Hi @jeoliva @maxsharabayko @ethouris , Could you review this PR?

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.

1 participant