Skip to content

Commit 4e25764

Browse files
committed
fix(http): fix panic when addrs in ConnectingTcpRemote is empty
Closes #2291
1 parent 523d66a commit 4e25764

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/client/connect/http.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,13 @@ impl ConnectingTcpRemote {
541541
}
542542
}
543543

544-
Err(err.take().expect("missing connect error"))
544+
match err {
545+
Some(e) => Err(e),
546+
None => Err(std::io::Error::new(
547+
std::io::ErrorKind::NotConnected,
548+
"Network unreachable"
549+
))
550+
}
545551
}
546552
}
547553

0 commit comments

Comments
 (0)