mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-18 17:23:52 -05:00
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:
committed by
GitHub
parent
b41c19bd25
commit
35b19320d4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user