Skip to content

Commit

Permalink
define defaults in sozu_command_lib::config
Browse files Browse the repository at this point in the history
timeout values of the Config are used as default for new listeners
  • Loading branch information
Keksoj committed Jun 2, 2023
1 parent 33abd28 commit 3a92069
Show file tree
Hide file tree
Showing 11 changed files with 245 additions and 101 deletions.
6 changes: 3 additions & 3 deletions bin/src/ctl/request_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl CommandManager {
.with_back_timeout(back_timeout)
.with_request_timeout(request_timeout)
.with_connect_timeout(connect_timeout)
.to_tls()
.to_tls(Some(&self.config))
.with_context(|| "Error creating HTTPS listener")?;

self.send_request(RequestType::AddHttpsListener(https_listener).into())
Expand Down Expand Up @@ -352,7 +352,7 @@ impl CommandManager {
.with_request_timeout(request_timeout)
.with_back_timeout(back_timeout)
.with_connect_timeout(connect_timeout)
.to_http()
.to_http(Some(&self.config))
.with_context(|| "Error creating HTTP listener")?;
self.send_request(RequestType::AddHttpListener(http_listener).into())
}
Expand All @@ -378,7 +378,7 @@ impl CommandManager {
let listener = ListenerBuilder::new_tcp(address)
.with_public_address(public_address)
.with_expect_proxy(expect_proxy)
.to_tcp()
.to_tcp(Some(&self.config))
.with_context(|| "Could not create TCP listener")?;

self.send_request(RequestType::AddTcpListener(listener).into())
Expand Down

0 comments on commit 3a92069

Please sign in to comment.