diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script b/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script index ff5af74c62..b7877fb0ef 100755 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script @@ -182,8 +182,9 @@ stop() { do_stop() { kill "$1" &> /dev/null || { echoRed "Unable to kill process $1"; return 1; } - for _ in $(seq 1 60); do + for i in $(seq 1 60); do isRunning "$1" || { echoGreen "Stopped [$1]"; rm -f "$2"; return 0; } + [[ $i -eq 30 ]] && kill "$1" &> /dev/null sleep 1 done echoRed "Unable to kill process $1";