Skip to content

Commit 8d93040

Browse files
committed
Merge branch '2.6.x' into 2.7.x
Closes gh-31984
2 parents cd59854 + 7c0ccdf commit 8d93040

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/OptionalLiveReloadServer.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ public void afterPropertiesSet() throws Exception {
5252
void startServer() {
5353
if (this.server != null) {
5454
try {
55+
int port = this.server.getPort();
5556
if (!this.server.isStarted()) {
56-
this.server.start();
57+
port = this.server.start();
5758
}
58-
logger.info(LogMessage.format("LiveReload server is running on port %s", this.server.getPort()));
59+
logger.info(LogMessage.format("LiveReload server is running on port %s", port));
5960
}
6061
catch (Exception ex) {
6162
logger.warn("Unable to start LiveReload server");

0 commit comments

Comments
 (0)