Stopping sessions when handling stop requests (#627)

* Dropping profiler session on stop request

* Changes to IXEventSession to simplify dropping sessions

* Stop sessions instead of dropping, disable flaky tests
This commit is contained in:
Madeline MacDonald
2018-06-05 13:48:55 -07:00
committed by GitHub
parent b41c19bd25
commit 35b19320d4
9 changed files with 235 additions and 161 deletions

View File

@@ -72,17 +72,17 @@ namespace Microsoft.SqlTools.ServiceLayer.Profiler
/// <summary>
/// Stop monitoring the session specified by the sessionId
/// </summary>
public bool StopMonitoringSession(string sessionId)
public bool StopMonitoringSession(string sessionId, out ProfilerSession session)
{
lock (this.sessionsLock)
{
if (this.monitoredSessions.ContainsKey(sessionId))
{
ProfilerSession session;
return this.monitoredSessions.Remove(sessionId, out session);
}
else
{
session = null;
return false;
}
}