Skip to content

Commit cb05616

Browse files
committed
Only while disposing
1 parent 4de8964 commit cb05616

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dotnet/src/webdriver/DriverService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,12 @@ protected virtual void Dispose(bool disposing)
288288
if (disposing)
289289
{
290290
this.Stop();
291-
}
292291

293-
if (this.driverServiceProcess is not null)
294-
{
295-
this.driverServiceProcess.OutputDataReceived -= this.OnDriverProcessDataReceived;
296-
this.driverServiceProcess.ErrorDataReceived -= this.OnDriverProcessDataReceived;
292+
if (this.driverServiceProcess is not null)
293+
{
294+
this.driverServiceProcess.OutputDataReceived -= this.OnDriverProcessDataReceived;
295+
this.driverServiceProcess.ErrorDataReceived -= this.OnDriverProcessDataReceived;
296+
}
297297
}
298298

299299
this.isDisposed = true;

0 commit comments

Comments
 (0)