Skip to content

Commit f1b26e9

Browse files
committed
Merge branch '3.4.x' into 3.5.x
Closes gh-48061
2 parents c7c0d33 + a21bfc2 commit f1b26e9

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServer.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,26 @@ public void stop() throws WebServerException {
279279
}
280280
try {
281281
this.undertow.stop();
282-
for (Closeable closeable : this.closeables) {
283-
closeable.close();
284-
}
285282
}
286283
catch (Exception ex) {
287284
throw new WebServerException("Unable to stop Undertow", ex);
288285
}
289286
}
290287
}
291288

289+
@Override
290+
public void destroy() {
291+
stop();
292+
try {
293+
for (Closeable closeable : this.closeables) {
294+
closeable.close();
295+
}
296+
}
297+
catch (IOException ex) {
298+
throw new WebServerException("Unable to destroy Undertow", ex);
299+
}
300+
}
301+
292302
@Override
293303
public int getPort() {
294304
List<Port> ports = getActualPorts();

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,6 @@ protected void portClashOfSecondaryConnectorResultsInPortInUseException() throws
255255
super.portClashOfSecondaryConnectorResultsInPortInUseException();
256256
}
257257

258-
@Test
259-
@Override
260-
@Disabled("Restart after stop is not supported with Undertow")
261-
protected void restartAfterStop() {
262-
}
263-
264-
@Test
265-
@Override
266-
@Disabled("Undertow's architecture prevents separating stop and destroy")
267-
protected void servletContextListenerContextDestroyedIsNotCalledWhenContainerIsStopped() {
268-
}
269-
270258
private void testAccessLog(String prefix, String suffix, String expectedFile)
271259
throws IOException, URISyntaxException {
272260
UndertowServletWebServerFactory factory = getFactory();

0 commit comments

Comments
 (0)