From 7be5d7ef9117285fdf21734588cadf70bb88607e Mon Sep 17 00:00:00 2001 From: Nikhil Sinha <131262146+nikhilsinhaparseable@users.noreply.github.com> Date: Wed, 27 Nov 2024 19:16:22 +0530 Subject: [PATCH] fix: port 80 ignored in ingestor endpoint (#1004) 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 {