You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connections leak with SqlDistributedLockConnectionStrategy.Azure #14
SqlDistributedLock.Try aquired with Azure strategy creates instance of AzureSqlDistributedLock and invokes it's TryAquire/TryAquireAsync with no contextHandle argument thus opening a new connection using provided connectionString. However when the lock is released and component is disposed, connection opened by it is not disposed thus leading to a connecion leakage.
Since outside connection vs. opening new connection case is determined anyway by keeping "ownsKeepalive" field way to go could be passing an connection instance to the LockScope if connection is being opened and having it disposed together with LockScope instance.
Activity
madelson commentedon Jan 11, 2018
Thanks for reporting @zavalita1. I am currently working on the next version of the library and I will incorporate a fix for this with that release.
Add test for confirming that internally-owned connections are cleaned…
madelson commentedon Feb 8, 2018
This is fixed as of version 1.4