@@ -832,7 +832,7 @@ export class Remote {
832832const logger = getMemoryLogger ( )
833833logger . info ( `Starting SSH process ID search with timeout:${ timeout } ms` )
834834
835- let attempts = 0
835+ let loopAttempts = 0
836836let lastFilePath :string | undefined
837837
838838const 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.
843843const text = await fs . readFile ( logPath , "utf8" )
844844
845- if ( attempts % 5 === 0 ) {
845+ if ( loopAttempts % 5 === 0 ) {
846846logger . debug ( `SSH log file size:${ text . length } bytes` )
847847}
848848
@@ -878,17 +878,17 @@ export class Remote {
878878const start = Date . now ( )
879879
880880const loop = async ( ) :Promise < number | undefined > => {
881- attempts ++
881+ loopAttempts ++
882882
883883const elapsed = Date . now ( ) - start
884884if ( 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` )
886886return 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` )
892892logger . 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` )
923923return result
924924}
925925