Skip to content

Commit

Permalink
g3proxy: add missed escaper level write stats
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq committed Oct 25, 2024
1 parent 465e508 commit 1c2325e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions g3proxy/src/escape/divert_tcp/http_forward/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

use std::sync::Arc;

use g3_io_ext::{AsyncStream, LimitedBufReader, LimitedWriter, NilLimitedReaderStats};
use g3_io_ext::{
AsyncStream, LimitedBufReader, LimitedWriter, LimitedWriterStats, NilLimitedReaderStats,
};

use super::{DivertTcpEscaper, DivertTcpEscaperStats};
use crate::escape::direct_fixed::http_forward::{DirectHttpForwardReader, DirectHttpForwardWriter};
Expand Down Expand Up @@ -44,8 +46,10 @@ impl DivertTcpEscaper {

let (ups_r, mut ups_w) = stream.into_split();

self.send_pp2_header(&mut ups_w, task_conf, task_notes, None)
let nw = self
.send_pp2_header(&mut ups_w, task_conf, task_notes, None)
.await?;
self.stats.add_write_bytes(nw);

let mut w_wrapper_stats = HttpForwardRemoteWrapperStats::new(&self.stats, &task_stats);
let mut r_wrapper_stats = HttpForwardTaskRemoteWrapperStats::new(task_stats);
Expand Down

0 comments on commit 1c2325e

Please sign in to comment.