Skip to content

Commit

Permalink
fix(client): fix panic when addrs in ConnectingTcpRemote is empty (#2292
Browse files Browse the repository at this point in the history
)

Closes #2291
  • Loading branch information
alexwl committed Sep 29, 2020
1 parent 523d66a commit 01103da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/client/connect/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,13 @@ impl ConnectingTcpRemote {
}
}

Err(err.take().expect("missing connect error"))
match err {
Some(e) => Err(e),
None => Err(std::io::Error::new(
std::io::ErrorKind::NotConnected,
"Network unreachable",
)),
}
}
}

Expand Down

0 comments on commit 01103da

Please sign in to comment.