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

Fix race between Attach and Detach Tokens #126

Merged
merged 1 commit into from
Dec 1, 2015
Merged

Conversation

BrennanConroy
Copy link
Member

Fixes part of #17 at least
@Tratcher

@@ -120,19 +123,24 @@ internal void AttachTokens()
ExpirationTokenRegistrations.Add(registration);
}
}
_lock.Release();
Copy link
Member

Choose a reason for hiding this comment

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

try/finally

@BrennanConroy
Copy link
Member Author

🆙 📅

@@ -107,17 +109,20 @@ internal void AttachTokens()
var expirationTokens = Options.ExpirationTokens;
if (expirationTokens != null)
{
for (int i = 0; i < expirationTokens.Count; i++)
lock(_lock)
Copy link

Choose a reason for hiding this comment

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

Formatting: `lock (_lock)

@Tratcher
Copy link
Member

Tratcher commented Dec 1, 2015

:shipit:

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

Successfully merging this pull request may close these issues.

4 participants