@@ -832,7 +832,7 @@ export class Remote {
832
832
const logger = getMemoryLogger ( )
833
833
logger . info ( `Starting SSH process ID search with timeout:${ timeout } ms` )
834
834
835
- let attempts = 0
835
+ let loopAttempts = 0
836
836
let lastFilePath :string | undefined
837
837
838
838
const search = async ( logPath :string ) :Promise < number | undefined > => {
@@ -842,7 +842,7 @@ export class Remote {
842
842
// process will be logging network information periodically to a file.
843
843
const text = await fs . readFile ( logPath , "utf8" )
844
844
845
- if ( attempts % 5 === 0 ) {
845
+ if ( loopAttempts % 5 === 0 ) {
846
846
logger . debug ( `SSH log file size:${ text . length } bytes` )
847
847
}
848
848
@@ -878,17 +878,17 @@ export class Remote {
878
878
const start = Date . now ( )
879
879
880
880
const loop = async ( ) :Promise < number | undefined > => {
881
- attempts ++
881
+ loopAttempts ++
882
882
883
883
const elapsed = Date . now ( ) - start
884
884
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` )
886
886
return undefined
887
887
}
888
888
889
889
// 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` )
892
892
logger . logMemoryUsage ( "SSH_PROCESS_SEARCH" )
893
893
}
894
894
@@ -919,7 +919,7 @@ export class Remote {
919
919
} )
920
920
}
921
921
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` )
923
923
return result
924
924
}
925
925