diff options
author | Yuchen Wu <[email protected]> | 2024-05-22 12:19:29 -0700 |
---|---|---|
committer | Yuchen Wu <[email protected]> | 2024-05-31 11:04:36 -0700 |
commit | fa071eb506411ff74c1986abebeeaa0d3e641db5 (patch) | |
tree | 36ec2d82fa48780a0fac44c39ed50efba9d52409 /pingora-proxy/src/lib.rs | |
parent | 4019aa0819ce70fb84ae9c1db7e702d7fe8701b3 (diff) | |
download | pingora-fa071eb506411ff74c1986abebeeaa0d3e641db5.tar.gz pingora-fa071eb506411ff74c1986abebeeaa0d3e641db5.zip |
Refactor Service API: Arc is no longer needed for apps.
This change makes a bit cleaner to use the API. It also allows to
modify the application logic before starting the service.
Diffstat (limited to 'pingora-proxy/src/lib.rs')
-rw-r--r-- | pingora-proxy/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pingora-proxy/src/lib.rs b/pingora-proxy/src/lib.rs index a60e6a7..eaf31d5 100644 --- a/pingora-proxy/src/lib.rs +++ b/pingora-proxy/src/lib.rs @@ -96,12 +96,12 @@ pub struct HttpProxy<SV> { } impl<SV> HttpProxy<SV> { - fn new(inner: SV, conf: Arc<ServerConf>) -> Arc<Self> { - Arc::new(HttpProxy { + fn new(inner: SV, conf: Arc<ServerConf>) -> Self { + HttpProxy { inner, client_upstream: Connector::new(Some(ConnectorOptions::from_server_conf(&conf))), shutdown: Notify::new(), - }) + } } async fn handle_new_request( |