Skip to content

Commit 20eab7d

Browse files
kleimkuhlerolix0r
andcommitted
Do not error when LINKERD2_PROXY_INBOUND_PORTS is empty (#1478)
When the `LINKERD2_PROXY_INBOUND_PORTS` environment is set and empty, we should not log an error message. Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com> Co-authored-by: Oliver Gould <ver@buoyant.io> (cherry picked from commit b80af37) Signed-off-by: Oliver Gould <ver@buoyant.io>
1 parent 13c2a1c commit 20eab7d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

linkerd/app/src/env.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,10 @@ fn parse_addr(s: &str) -> Result<Addr, ParseError> {
969969

970970
fn parse_port_set(s: &str) -> Result<HashSet<u16>, ParseError> {
971971
let mut set = HashSet::new();
972-
for num in s.split(',') {
973-
set.insert(parse_number::<u16>(num)?);
972+
if !s.is_empty() {
973+
for num in s.split(',') {
974+
set.insert(parse_number::<u16>(num)?);
975+
}
974976
}
975977
Ok(set)
976978
}

0 commit comments

Comments
 (0)