fix: bug for dynamic reloading of config files
This commit is contained in:
parent
3d60175c11
commit
7c2205f275
5 changed files with 44 additions and 12 deletions
|
|
@ -36,6 +36,7 @@ pub async fn entrypoint<T>(
|
|||
proxy_config: &ProxyConfig,
|
||||
app_config_list: &AppConfigList<T>,
|
||||
runtime_handle: &tokio::runtime::Handle,
|
||||
term_notify: Option<Arc<tokio::sync::Notify>>,
|
||||
) -> Result<()>
|
||||
where
|
||||
T: CryptoSource + Clone + Send + Sync + 'static,
|
||||
|
|
@ -68,7 +69,7 @@ where
|
|||
runtime_handle: runtime_handle.clone(),
|
||||
});
|
||||
|
||||
// TODO: HTTP2 only client is needed for http2 cleartext case
|
||||
// build message handler including a request forwarder
|
||||
let msg_handler = Arc::new(
|
||||
HttpMessageHandlerBuilder::default()
|
||||
.forwarder(Arc::new(Forwarder::new().await))
|
||||
|
|
@ -91,7 +92,7 @@ where
|
|||
.build()
|
||||
.unwrap();
|
||||
|
||||
globals.runtime_handle.spawn(proxy.start())
|
||||
globals.runtime_handle.spawn(proxy.start(term_notify.clone()))
|
||||
}));
|
||||
|
||||
// wait for all future
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue