@@ -832,7 +832,7 @@ export class Remote {
832832 const logger = getMemoryLogger ( )
833833 logger . info ( `Starting SSH process ID search with timeout: ${ timeout } ms` )
834834
835- let attempts = 0
835+ let loopAttempts = 0
836836 let lastFilePath : string | undefined
837837
838838 const search = async ( logPath : string ) : Promise < number | undefined > => {
@@ -842,7 +842,7 @@ export class Remote {
842842 // process will be logging network information periodically to a file.
843843 const text = await fs . readFile ( logPath , "utf8" )
844844
845- if ( attempts % 5 === 0 ) {
845+ if ( loopAttempts % 5 === 0 ) {
846846 logger . debug ( `SSH log file size: ${ text . length } bytes` )
847847 }
848848
@@ -878,17 +878,17 @@ export class Remote {
878878 const start = Date . now ( )
879879
880880 const loop = async ( ) : Promise < number | undefined > => {
881- attempts ++
881+ loopAttempts ++
882882
883883 const elapsed = Date . now ( ) - start
884884 if ( elapsed > timeout ) {
885- logger . info ( `SSH process ID search timed out after ${ attempts } attempts, elapsed: ${ elapsed } ms` )
885+ logger . info ( `SSH process ID search timed out after ${ loopAttempts } attempts, elapsed: ${ elapsed } ms` )
886886 return undefined
887887 }
888888
889889 // Log progress periodically
890- if ( attempts % 5 === 0 ) {
891- logger . info ( `SSH process ID search attempt #${ attempts } , elapsed: ${ elapsed } ms` )
890+ if ( loopAttempts % 5 === 0 ) {
891+ logger . info ( `SSH process ID search attempt #${ loopAttempts } , elapsed: ${ elapsed } ms` )
892892 logger . logMemoryUsage ( "SSH_PROCESS_SEARCH" )
893893 }
894894
@@ -919,7 +919,7 @@ export class Remote {
919919 } )
920920 }
921921
922- logger . info ( `SSH process ID search completed successfully after ${ attempts } attempts, elapsed: ${ elapsed } ms` )
922+ logger . info ( `SSH process ID search completed successfully after ${ loopAttempts } attempts, elapsed: ${ elapsed } ms` )
923923 return result
924924 }
925925
0 commit comments