Skip to content

Commit

Permalink
Fixed for non-httos feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Richer Archambault committed Nov 13, 2020
1 parent aaaf91d commit b3082d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions saphir/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,23 @@ impl ListenerBuilder {
server_name,
request_timeout_ms,
request_body_max,
shutdown_signal,
graceful_shutdown,
} = self;

let iface = iface.unwrap_or_else(|| DEFAULT_LISTENER_IFACE.to_string());
let shutdown = if let Some(sig) = shutdown_signal {
ServerShutdown::new(graceful_shutdown, sig)
} else {
ServerShutdown::pending()
};

ListenerConfig {
iface,
request_timeout_ms,
server_name: server_name.unwrap_or_else(|| DEFAULT_SERVER_NAME.to_string()),
request_body_max,
shutdown
}
}
}
Expand All @@ -231,6 +239,7 @@ pub struct ListenerConfig {
request_timeout_ms: Option<u64>,
request_body_max: Option<usize>,
server_name: String,
shutdown: ServerShutdown,
}

#[cfg(feature = "https")]
Expand Down

0 comments on commit b3082d4

Please sign in to comment.