Fix 'TcpListener' port required regression.

This commit is contained in:
Sergio Benitez 2024-05-03 17:17:56 -07:00
parent 5f9ff3f3af
commit 370287c9a6
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ impl Bind for TcpListener {
e.map(|e| e.tcp()).unwrap_or(Some(default))
}).map_err(Left)?;
if let Some(port) = figment.extract_inner("port").map_err(Left)? {
if figment.contains("port") {
let port = figment.extract_inner("port").map_err(Left)?;
address.set_port(port);
}