Skip to content

Commit

Permalink
APPENG-1147: Revert signal handling for SIGINT and SIGTERM (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
normanma-tw authored Feb 27, 2025
1 parent 33fdb47 commit 755660d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.15.3] - 2025-02-27

### Removed
* Removed the logging introduced in `2.15.2`.

## [2.15.2] - 2025-02-19

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.springframework.context.SmartLifecycle;
import org.springframework.context.support.DefaultLifecycleProcessor;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import sun.misc.Signal;

@Slf4j
public class GracefulShutdowner implements SmartLifecycle, InitializingBean {
Expand Down Expand Up @@ -47,7 +46,6 @@ public void afterPropertiesSet() {
@Override
public void start() {
running = true;
initShutdownSignalLogging(new Signal("INT"), new Signal("TERM"));

validateStrategies();

Expand All @@ -63,13 +61,6 @@ public void start() {
}
}

protected void initShutdownSignalLogging(Signal... signals) {
for (var signal : signals) {
log.info("Registering shutdown signal handler for signal '{}'", signal.toString());
Signal.handle(signal, sig -> log.info("Received signal {}", sig.toString()));
}
}

protected void validateStrategies() {
var registeredStrategies = ImmutableSet.copyOf(gracefulShutdownStrategiesRegistry.getStrategies());
var strategiesInAppContext = ImmutableSet.copyOf(applicationContext.getBeansOfType(GracefulShutdownStrategy.class).values());
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=2.15.2
version=2.15.3

0 comments on commit 755660d

Please sign in to comment.