Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against KeyNotFound in RequestTimer dictionary #36

Closed
pardahlman opened this issue Feb 9, 2016 · 0 comments
Closed

Guard against KeyNotFound in RequestTimer dictionary #36

pardahlman opened this issue Feb 9, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@pardahlman
Copy link
Owner

Currently, in Requester.cs, there's a line of code where we expect a dictionary to contain a certain key

_requestTimerDictionary[args.BasicProperties.CorrelationId]?.Dispose();

If the response timer has expired, or adding a new entry in the dictionary failed that key may not exists. This should be handled more gracious.

@pardahlman pardahlman added this to the 1.8.5 milestone Feb 9, 2016
@pardahlman pardahlman changed the title Guard against KeyNotFound for RequestTimers Guard against KeyNotFound in RequestTimer dictionary Feb 9, 2016
pardahlman pushed a commit that referenced this issue Feb 10, 2016
This is done since the timer dispatcher may be invoked at the same time as
the message is recieved, and then there is a race condition where we might
end up with a KeyNotFoundException.
@pardahlman pardahlman self-assigned this Feb 10, 2016
pardahlman pushed a commit that referenced this issue Feb 10, 2016
Guard against KeyNotFound in dictionary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant