Skip to content

Commit

Permalink
fix(client): fix panic when addrs in ConnectingTcpRemote is empty (hy…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwl authored and Benxiang Ge committed Jul 26, 2021
1 parent 944c2ef commit 4ab12f5
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 4ab12f5

Please sign in to comment.