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

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

@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.

@ghk ghk Update source/MongoDB/Connections/Connection.cs
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.
276b991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment