@@ -166,17 +166,13 @@ export class SessionManager implements Middleware {
166
166
}
167
167
}
168
168
169
- // Generate a random id for the named pipes in case they have multiple instances of PSES running
170
- const id = crypto . randomBytes ( 10 ) . toString ( "hex" ) ;
171
169
this . editorServicesArgs =
172
170
`-HostName 'Visual Studio Code Host' ` +
173
171
`-HostProfileId 'Microsoft.VSCode' ` +
174
172
`-HostVersion '${ this . hostVersion } '` +
175
173
`-AdditionalModules @('PowerShellEditorServices.VSCode') ` +
176
174
`-BundledModulesPath '${ PowerShellProcess . escapeSingleQuotes ( this . bundledModulesPath ) } '` +
177
175
`-EnableConsoleRepl ` +
178
- `-LanguageServicePipeName LanguageService_${ id } .pipe ` +
179
- `-DebugServicePipeName DebugService_${ id } .pipe ` ;
180
176
181
177
if ( this . sessionSettings . developer . editorServicesWaitForDebugger ) {
182
178
this . editorServicesArgs += "-WaitForDebugger " ;
@@ -535,19 +531,16 @@ export class SessionManager implements Middleware {
535
531
}
536
532
537
533
private startLanguageClient ( sessionDetails : utils . IEditorServicesSessionDetails ) {
538
-
539
- const pipeName = sessionDetails . languageServicePipeName ;
540
-
541
534
// Log the session details object
542
535
this . log . write ( JSON . stringify ( sessionDetails ) ) ;
543
536
544
537
try {
545
- this . log . write ( " Connecting to language service on pipe " + pipeName + "..." ) ;
538
+ this . log . write ( ` Connecting to language service on pipe ${ sessionDetails . languageServicePipeName } ...` ) ;
546
539
547
540
const connectFunc = ( ) => {
548
541
return new Promise < StreamInfo > (
549
542
( resolve , reject ) => {
550
- const socket = net . connect ( utils . getPipePath ( pipeName ) ) ;
543
+ const socket = net . connect ( sessionDetails . languageServicePipeName ) ;
551
544
socket . on (
552
545
"connect" ,
553
546
( ) => {
0 commit comments