Skip to content

Commit

Permalink
Fix the tx/rx update in ProxyStream
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye authored and zonyitoo committed Jul 20, 2020
1 parent b56eaac commit edf6909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relay/tcprelay/proxy_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ impl AsyncRead for ProxyStream {
{
if self.is_proxied() {
if let Poll::Ready(Ok(n)) = p {
self.context().local_flow_statistic().tcp().incr_tx(n as u64);
self.context().local_flow_statistic().tcp().incr_rx(n as u64);
}
}
}
Expand All @@ -386,7 +386,7 @@ impl AsyncWrite for ProxyStream {
{
if self.is_proxied() {
if let Poll::Ready(Ok(n)) = p {
self.context().local_flow_statistic().tcp().incr_rx(n as u64);
self.context().local_flow_statistic().tcp().incr_tx(n as u64);
}
}
}
Expand Down

0 comments on commit edf6909

Please sign in to comment.