File tree Expand file tree Collapse file tree
OVRLighthouseManager/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ private async Task OnVRMonitorConnected()
8686 }
8787
8888 var managedDevices = _lighthouseSettingsService . Devices . Where ( d => d . IsManaged ) . ToArray ( ) ;
89- await Task . WhenAll ( managedDevices . Select ( async d =>
90- {
89+ foreach ( var d in managedDevices )
90+ {
9191 Log . Information ( $ "Power On { d . Name } ") ;
9292 try
9393 {
@@ -98,7 +98,8 @@ await Task.WhenAll(managedDevices.Select(async d =>
9898 {
9999 Log . Error ( e , $ "Failed to power on { d . Name } ") ;
100100 }
101- } ) . ToArray ( ) ) ;
101+ await Task . Delay ( 200 ) ;
102+ }
102103
103104 Log . Information ( "OnVRMonitorConnected Done" ) ;
104105 }
@@ -118,7 +119,7 @@ private async Task OnVRSystemQuit()
118119 }
119120
120121 var managedDevices = _lighthouseSettingsService . Devices . Where ( d => d . IsManaged ) . ToArray ( ) ;
121- await Task . WhenAll ( managedDevices . Select ( async d =>
122+ foreach ( var d in managedDevices )
122123 {
123124 var powerDownMode = _lighthouseSettingsService . PowerDownMode ;
124125 if ( powerDownMode == PowerDownMode . Sleep || d . Version == LighthouseVersion . V1 )
@@ -151,7 +152,8 @@ await Task.WhenAll(managedDevices.Select(async d =>
151152 {
152153 throw new InvalidProgramException ( "Unknown PowerDownMode" ) ;
153154 }
154- } ) . ToArray ( ) ) ;
155+ await Task . Delay ( 200 ) ;
156+ }
155157
156158 await _scanCommand . StopScan ( ) ;
157159
You can’t perform that action at this time.
0 commit comments