Skip to content

Commit 28cf415

Browse files
committed
Don't block while waiting initialization
1 parent e364834 commit 28cf415

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dotnet/src/webdriver/DriverService.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,15 @@ public void Start()
256256
this.OnDriverProcessStarting(eventArgs);
257257

258258
this.driverServiceProcess.Start();
259-
bool serviceAvailable = this.WaitForServiceInitialization();
260-
DriverProcessStartedEventArgs processStartedEventArgs = new DriverProcessStartedEventArgs(this.driverServiceProcess);
261-
this.OnDriverProcessStarted(processStartedEventArgs);
262259

263260
this.driverServiceProcess.BeginOutputReadLine();
264261
this.driverServiceProcess.BeginErrorReadLine();
265262

263+
bool serviceAvailable = this.WaitForServiceInitialization();
264+
265+
DriverProcessStartedEventArgs processStartedEventArgs = new DriverProcessStartedEventArgs(this.driverServiceProcess);
266+
this.OnDriverProcessStarted(processStartedEventArgs);
267+
266268
if (!serviceAvailable)
267269
{
268270
throw new WebDriverException($"Cannot start the driver service on {this.ServiceUrl}");

0 commit comments

Comments
 (0)