Skip to content

Commit

Permalink
fix(http): fix panic when addrs in ConnectingTcpRemote is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwl committed Sep 29, 2020
1 parent 523d66a commit 4e25764
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 4e25764

Please sign in to comment.