Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ public void updateLifecycle(@NonNull ServiceLifeCycle lifeCycle) {
}

protected void updateLifecycle(@NonNull ServiceLifeCycle lifeCycle, boolean switchToDeletedOnStop) {
updateLifecycle(lifeCycle, switchToDeletedOnStop, switchToDeletedOnStop);
}

protected void updateLifecycle(@NonNull ServiceLifeCycle lifeCycle, boolean switchToDeletedOnStop, boolean removeFiles) {
try {
// prevent multiple service updates at the same time
this.lifecycleLock.lock();
Expand Down Expand Up @@ -389,7 +393,9 @@ protected void updateLifecycle(@NonNull ServiceLifeCycle lifeCycle, boolean swit
LOGGER.info(this.i18n.translate("cloudnet-service-post-stop-message", this.serviceReplacement()));
} else if (this.lifeCycle() == ServiceLifeCycle.RUNNING) {
this.stopProcess();
this.doRemoveFilesAfterStop();
if (removeFiles) {
this.doRemoveFilesAfterStop();
}
// reset the service lifecycle to prepared
this.pushServiceInfoSnapshotUpdate(ServiceLifeCycle.PREPARED);
}
Expand Down