Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Race condition in ZyanDispatcher related to SessionManager #83

@yallie

Description

@yallie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions