mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(lifecycle): run start/ready hooks when FLOCI_PORT is non-default (#2439)
onHttpStart compared the HTTP server port against a hardcoded 4566, but
Quarkus actually listens on floci.port (quarkus.http.port: ${floci.port}).
With any non-default FLOCI_PORT the guard never matched, so start/ready
hooks never ran and /_floci/init stayed stuck at boot:true forever while
/_floci/health returned 200.
Compare against config.port() instead. TLS mode is unchanged: TlsConfigSource
pins the HTTP backend to 4510 regardless of floci.port.
Fixes #2437
Co-authored-by: anmolxlight <anmolxlight@users.noreply.github.com>
This commit is contained in:
1 parent
39ed7712a7
commit
ba97c084eb
2 files changed
+22
-2
No files matched your search
@@ -49,7 +49,6 @@ import java.util.Optional;
|
||||
public class EmulatorLifecycle {
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(EmulatorLifecycle.class);
|
||||
private static final int HTTP_PORT = 4566;
|
||||
private static final int TLS_HTTP_BACKEND_PORT = 4510;
|
||||
|
||||
@ConfigProperty(name = "quarkus.application.version", defaultValue = "")
|
||||
@@ -211,7 +210,11 @@ public class EmulatorLifecycle {
|
||||
}
|
||||
|
||||
void onHttpStart(@ObservesAsync HttpServerStart event) {
|
||||
int expectedPort = config.tls().enabled() ? TLS_HTTP_BACKEND_PORT : HTTP_PORT;
|
||||
// Non-TLS: Quarkus listens on floci.port (quarkus.http.port: ${floci.port} in
|
||||
// application.yml). TLS mode: TlsConfigSource pins the HTTP backend to 4510 and the
|
||||
// public port is served by TlsProxyServer. Comparing against a hardcoded 4566 here
|
||||
// made start/ready hooks never run when FLOCI_PORT was non-default (#2437).
|
||||
int expectedPort = config.tls().enabled() ? TLS_HTTP_BACKEND_PORT : config.port();
|
||||
if (event.options().getPort() != expectedPort) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user