mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-07 01:39:02 +00:00
Standalone Jetty will, by default, include a Connection: close header in all responses once graceful shutdown has begun. Previously, the way in which we were shutting Jetty down did not cause this to happen. This commit updates JettyGracefulShutdown to shut down each connector. This causes Jetty to send the Connection: close header, aligning its behaviour more closely with what it does when used standalone. The tests have also been updated to verify this behaviour and to ensure that the correct port is used for requests even once the connector is no longer bound and the web server no longer knows its ephemeral port. See gh-4657