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 {
629
629
throw new Error ( 'Timeout. Named pipe information not received from server.' ) ;
630
630
}
631
631
632
- const socketPromise = new Promise < net . Socket > ( ( resolve ) => {
632
+ const socketPromise = new Promise < net . Socket > ( ( resolve , reject ) => {
633
633
_channel . appendLine ( 'attempting to connect client to server...' ) ;
634
634
const socket = net . createConnection ( pipeConnectionInfo . pipeName , ( ) => {
635
635
_channel . appendLine ( 'client has connected to server' ) ;
636
636
resolve ( socket ) ;
637
637
} ) ;
638
+
639
+ // If we failed to connect for any reason, ensure the error is propagated.
640
+ socket . on ( 'error' , ( err ) => reject ( err ) ) ;
638
641
} ) ;
639
642
640
643
// Wait for the client to connect to the named pipe.
You can’t perform that action at this time.
0 commit comments