diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyWebServer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyWebServer.java index 9ba693a3b0..7191dcf44a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyWebServer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyWebServer.java @@ -115,15 +115,14 @@ public class NettyWebServer implements WebServer { @Override public void stop() throws WebServerException { if (this.disposableServer != null) { - // temporary fix for gh-9146 - this.disposableServer.onDispose() - .doFinally((signal) -> HttpResources.reset()); if (this.lifecycleTimeout != null) { this.disposableServer.disposeNow(this.lifecycleTimeout); } else { this.disposableServer.disposeNow(); } + // temporary fix for gh-9146 + HttpResources.shutdown(); this.disposableServer = null; } }