File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class Builder {
7474 private autoDeployBuildType : 'Fast' | 'Maven' | 'Gradle' ;
7575 private autoDeployMode : 'On Save' | 'On Shortcut' | 'Disabled' ;
7676 private isDeploying = false ;
77- private hasRetried = false ;
77+ private attempts = 0 ;
7878
7979 /**
8080 * Private constructor for Singleton pattern
@@ -237,13 +237,13 @@ export class Builder {
237237 await new Promise ( resolve => setTimeout ( resolve , 100 ) ) ;
238238 Browser . getInstance ( ) . run ( appName ) ;
239239 }
240-
241- this . hasRetried = false ;
240+
241+ this . attempts = 0 ;
242242 } catch ( err ) {
243243 const errorMessage = err instanceof Error ? err . message : String ( err ) ;
244244 const isBusyError = errorMessage . includes ( 'EBUSY' ) || errorMessage . includes ( 'resource busy or locked' ) ;
245- if ( isBusyError && ! this . hasRetried ) {
246- this . hasRetried = true ;
245+ if ( isBusyError && this . attempts < 3 ) {
246+ this . attempts ++ ;
247247 await tomcat . kill ( ) ;
248248 this . deploy ( type ) ;
249249 } else {
You can’t perform that action at this time.
0 commit comments