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

Race condition in ZyanDispatcher related to SessionManager #83

Closed
yallie opened this issue Nov 4, 2020 · 0 comments
Closed

Race condition in ZyanDispatcher related to SessionManager #83

yallie opened this issue Nov 4, 2020 · 0 comments
Labels
Milestone

Comments

@yallie
Copy link
Member

yallie commented Nov 4, 2020

Here it is:

private void Invoke_SetSession(InvocationDetails details)
{
	// validate session
	var sessionID = ...
	if (!_host.SessionManager.ExistSession(sessionID))
	{
		throw new InvalidSessionException(...);
	}

	// now someone calls TerminateSession(sessionID), and session
	// doesn't exist anymore, so GetSessionBySessionID returns null 

	// set current session
	details.Session = _host.SessionManager.GetSessionBySessionID(sessionID); // returns null
	details.Session.Timestamp = DateTime.Now; // NRE is thrown
	...
}
@yallie yallie added the bug label Nov 4, 2020
@yallie yallie closed this as completed in fd9499a Nov 6, 2020
@yallie yallie added this to the 2.14 milestone Nov 6, 2020
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