@@ -166,17 +166,13 @@ export class SessionManager implements Middleware {
166166 }
167167 }
168168
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" ) ;
171169 this . editorServicesArgs =
172170 `-HostName 'Visual Studio Code Host' ` +
173171 `-HostProfileId 'Microsoft.VSCode' ` +
174172 `-HostVersion '${ this . hostVersion } '` +
175173 `-AdditionalModules @('PowerShellEditorServices.VSCode') ` +
176174 `-BundledModulesPath '${ PowerShellProcess . escapeSingleQuotes ( this . bundledModulesPath ) } '` +
177175 `-EnableConsoleRepl ` +
178- `-LanguageServicePipeName LanguageService_${ id } .pipe ` +
179- `-DebugServicePipeName DebugService_${ id } .pipe ` ;
180176
181177 if ( this . sessionSettings . developer . editorServicesWaitForDebugger ) {
182178 this . editorServicesArgs += "-WaitForDebugger " ;
@@ -535,19 +531,16 @@ export class SessionManager implements Middleware {
535531 }
536532
537533 private startLanguageClient ( sessionDetails : utils . IEditorServicesSessionDetails ) {
538-
539- const pipeName = sessionDetails . languageServicePipeName ;
540-
541534 // Log the session details object
542535 this . log . write ( JSON . stringify ( sessionDetails ) ) ;
543536
544537 try {
545- this . log . write ( " Connecting to language service on pipe " + pipeName + "..." ) ;
538+ this . log . write ( ` Connecting to language service on pipe ${ sessionDetails . languageServicePipeName } ...` ) ;
546539
547540 const connectFunc = ( ) => {
548541 return new Promise < StreamInfo > (
549542 ( resolve , reject ) => {
550- const socket = net . connect ( utils . getPipePath ( pipeName ) ) ;
543+ const socket = net . connect ( sessionDetails . languageServicePipeName ) ;
551544 socket . on (
552545 "connect" ,
553546 ( ) => {
0 commit comments