Skip to content

Commit

Permalink
[dotnet] Close dev tools session safely (#12660)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Sep 1, 2023
1 parent cef99fc commit d670a70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/Chromium/ChromiumDriver.cs
Expand Up @@ -323,7 +323,7 @@ public void CloseDevToolsSession()
{
if (this.devToolsSession != null)
{
this.devToolsSession.StopSession(true).ConfigureAwait(false).GetAwaiter().GetResult();
Task.Run(async () => await this.devToolsSession.StopSession(true)).GetAwaiter().GetResult();
}
}

Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/Firefox/FirefoxDriver.cs
Expand Up @@ -415,7 +415,7 @@ public void CloseDevToolsSession()
{
if (this.devToolsSession != null)
{
this.devToolsSession.StopSession(true).ConfigureAwait(false).GetAwaiter().GetResult();
Task.Run(async () => await this.devToolsSession.StopSession(true)).GetAwaiter().GetResult();
}
}

Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/Remote/RemoteWebDriver.cs
Expand Up @@ -475,7 +475,7 @@ public void CloseDevToolsSession()
{
if (this.devToolsSession != null)
{
this.devToolsSession.StopSession(true).ConfigureAwait(false).GetAwaiter().GetResult();
Task.Run(async () => await this.devToolsSession.StopSession(true)).GetAwaiter().GetResult();
}
}

Expand Down

0 comments on commit d670a70

Please sign in to comment.