From 851949931f2afa467188ed44fe39da61eb083edf Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Wed, 27 Nov 2024 10:34:48 +0000 Subject: [PATCH] fix: port 80 ignored in ingestor endpoint current state - if ingest node starts at port 80 i.e. if env vars P_ADDR or P_INGESTOR_ENDPOINT are set with port 80 server ignores the port and panics at start with error fix - if port is ignored, use default port to 80 --- server/src/storage/staging.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/storage/staging.rs b/server/src/storage/staging.rs index 4f9fdd22b..ac5798ac3 100644 --- a/server/src/storage/staging.rs +++ b/server/src/storage/staging.rs @@ -363,7 +363,7 @@ pub fn get_ingestor_info() -> anyhow::Result { // all the files should be in the staging directory root let entries = std::fs::read_dir(path)?; let url = get_url(); - let port = url.port().expect("here port should be defined").to_string(); + let port = url.port().unwrap_or(80).to_string(); let url = url.to_string(); for entry in entries {