File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export async function createLocalStackStatusTracker(
3737 } ;
3838
3939 const deriveStatus = ( ) => {
40- const newStatus = getLocalStackStatus ( containerStatus , healthCheck ) ;
40+ const newStatus = getLocalStackStatus ( containerStatus , healthCheck , status ) ;
4141 setStatus ( newStatus ) ;
4242 } ;
4343
@@ -85,11 +85,18 @@ export async function createLocalStackStatusTracker(
8585function getLocalStackStatus (
8686 containerStatus : ContainerStatus | undefined ,
8787 healthCheck : boolean | undefined ,
88+ previousStatus ?: LocalStackStatus ,
8889) : LocalStackStatus {
8990 if ( containerStatus === "running" ) {
9091 if ( healthCheck === true ) {
9192 return "running" ;
9293 } else {
94+ // When the LS container is running, and the health check fails:
95+ // - If the previous status was "running", we are likely stopping LS
96+ // - If the previous status was "stopping", we are still stopping LS
97+ if ( previousStatus === "running" || previousStatus === "stopping" ) {
98+ return "stopping" ;
99+ }
93100 return "starting" ;
94101 }
95102 } else if ( containerStatus === "stopping" ) {
You can’t perform that action at this time.
0 commit comments