Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ancwrd1 committed Jan 9, 2025
1 parent 787d95c commit 1faff31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snxcore/src/ccc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl CccHttpClient {
}
}

async fn send_raw_request(&self, request: CccClientRequestData) -> anyhow::Result<SExpression> {
async fn send_request(&self, request: CccClientRequestData) -> anyhow::Result<SExpression> {
let with_cert = matches!(request.data, RequestData::Auth(_));
let expr = SExpression::from(CccClientRequest { data: request });

Expand Down Expand Up @@ -182,7 +182,7 @@ impl CccHttpClient {
}

async fn send_ccc_request(&self, req: CccClientRequestData) -> anyhow::Result<ResponseData> {
self.send_raw_request(req)
self.send_request(req)
.await?
.try_into::<CccServerResponse>()?
.data
Expand Down Expand Up @@ -217,6 +217,6 @@ impl CccHttpClient {
}

pub async fn get_server_info(&self) -> anyhow::Result<SExpression> {
self.send_raw_request(self.new_client_hello_request()).await
self.send_request(self.new_client_hello_request()).await
}
}

0 comments on commit 1faff31

Please sign in to comment.