Skip to content

Commit aef7c05

Browse files
authored
Merge pull request #51307 from mathias82/devmode-500-fix-clean
Fix deployment problem lost while re-scanning in dev-mode
2 parents 5a4cb97 + 2dd1da2 commit aef7c05

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/devmode/VertxHttpHotReplacementSetup.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
public class VertxHttpHotReplacementSetup implements HotReplacementSetup {
3333

3434
private volatile long nextUpdate;
35+
private volatile Throwable tempDeploymentProblem;
3536
private HotReplacementContext hotReplacementContext;
3637

3738
private static final long HOT_REPLACEMENT_INTERVAL = 2000;
@@ -104,6 +105,10 @@ public void handle(AsyncResult<Void> event) {
104105
}
105106
});
106107
}
108+
if (tempDeploymentProblem != null) {
109+
handleDeploymentProblem(routingContext, tempDeploymentProblem);
110+
return;
111+
}
107112
if (hotReplacementContext.getDeploymentProblem() != null && routingContext.request().path().endsWith(CONFIG_FIX)) {
108113

109114
routingContext.request().setExpectMultipart(true);
@@ -160,9 +165,12 @@ public Boolean call() {
160165
nextUpdate = System.currentTimeMillis() + HOT_REPLACEMENT_INTERVAL;
161166
Object currentState = VertxHttpRecorder.getCurrentApplicationState();
162167
try {
168+
tempDeploymentProblem = hotReplacementContext.getDeploymentProblem();
163169
restart = hotReplacementContext.doScan(true);
164170
} catch (Exception e) {
165171
throw new IllegalStateException("Unable to perform live reload scanning", e);
172+
} finally {
173+
tempDeploymentProblem = null;
166174
}
167175
if (currentState != VertxHttpRecorder.getCurrentApplicationState()) {
168176
//its possible a Kafka message or some other source triggered a reload,

0 commit comments

Comments
 (0)