File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -325,24 +325,24 @@ export class OmniSharpServer {
325325 this . eventStream . post ( new ObservableEvents . OmnisharpInitialisation ( new Date ( ) , solutionPath ) ) ;
326326 this . _fireEvent ( Events . BeforeServerStart , solutionPath ) ;
327327
328- return launchOmniSharp ( cwd , args , launchInfo ) . then ( async launchResult => {
328+ try {
329+ let launchResult = await launchOmniSharp ( cwd , args , launchInfo ) ;
329330 this . eventStream . post ( new ObservableEvents . OmnisharpLaunch ( launchResult . monoVersion , launchResult . command , launchResult . process . pid ) ) ;
330331
331332 this . _serverProcess = launchResult . process ;
332333 this . _delayTrackers = { } ;
333334 this . _setState ( ServerState . Started ) ;
334335 this . _fireEvent ( Events . ServerStart , solutionPath ) ;
335336
336- return this . _doConnect ( ) ;
337- } ) . then ( ( ) => {
338- // Start telemetry reporting
337+ await this . _doConnect ( ) ;
338+
339339 this . _telemetryIntervalId = setInterval ( ( ) => this . _reportTelemetry ( ) , TelemetryReportingDelay ) ;
340- } ) . then ( ( ) => {
341340 this . _requestQueue . drain ( ) ;
342- } ) . catch ( async err => {
341+ }
342+ catch ( err ) {
343343 this . _fireEvent ( Events . ServerError , err ) ;
344344 return this . stop ( ) ;
345- } ) ;
345+ }
346346 }
347347
348348 private debounceUpdateProjectWithLeadingTrue = ( ) => {
You can’t perform that action at this time.
0 commit comments