Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Fix memory leak when replacing invalid connections on multi threaded environment. #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghk
Copy link

@ghk ghk commented Oct 1, 2012

make ReplaceInvalidCollection done while holding lock.

Without holding lock, there is race condition between threads on replacing connections, i.e. "_connection"s created but only one of them used. This creates many unclosed TCPClients.

make ReplaceInvalidCollection done while holding lock

Without holding lock, there is race condition between threads on replacing connections, i.e. "_connection"s created but only one of them used. This creates many unclosed TCPClients.
Copy link

@gabrielsimas gabrielsimas left a comment

Choose a reason for hiding this comment

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

Good Job!
I did not see problem!

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

Successfully merging this pull request may close these issues.

2 participants