File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -629,12 +629,15 @@ export class RoslynLanguageServer {
629629 throw new Error ( 'Timeout. Named pipe information not received from server.' ) ;
630630 }
631631
632- const socketPromise = new Promise < net . Socket > ( ( resolve ) => {
632+ const socketPromise = new Promise < net . Socket > ( ( resolve , reject ) => {
633633 _channel . appendLine ( 'attempting to connect client to server...' ) ;
634634 const socket = net . createConnection ( pipeConnectionInfo . pipeName , ( ) => {
635635 _channel . appendLine ( 'client has connected to server' ) ;
636636 resolve ( socket ) ;
637637 } ) ;
638+
639+ // If we failed to connect for any reason, ensure the error is propagated.
640+ socket . on ( 'error' , ( err ) => reject ( err ) ) ;
638641 } ) ;
639642
640643 // Wait for the client to connect to the named pipe.
You can’t perform that action at this time.
0 commit comments