Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
eycorsican committed Oct 6, 2024
1 parent 1ab748d commit e4ce359
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion leaf/src/app/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl Dispatcher {
{
Ok((up_count, down_count)) => {
debug!(
"tcp link {} <-> {} done, ({}, {}) bytes transfered [{}]",
"tcp link {} <-> {} done, ({}, {}) bytes transferred [{}]",
&sess.source,
&sess.destination,
up_count,
Expand Down
6 changes: 3 additions & 3 deletions leaf/src/common/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl CopyBuffer {
})
}

pub fn amount_transfered(&self) -> u64 {
pub fn amount_transferred(&self) -> u64 {
self.amt
}

Expand Down Expand Up @@ -186,7 +186,7 @@ where
match delay.as_mut().poll(cx) {
Poll::Ready(()) => {
*a_to_b =
TransferState::ShuttingDown(buf.amount_transfered());
TransferState::ShuttingDown(buf.amount_transferred());
continue;
}
Poll::Pending => (),
Expand Down Expand Up @@ -226,7 +226,7 @@ where
match delay.as_mut().poll(cx) {
Poll::Ready(()) => {
*b_to_a =
TransferState::ShuttingDown(buf.amount_transfered());
TransferState::ShuttingDown(buf.amount_transferred());
continue;
}
Poll::Pending => (),
Expand Down
2 changes: 1 addition & 1 deletion leaf/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub fn test_tcp_half_close_on_configs(configs: Vec<String>, socks_addr: &str, so
// after the shutdown, but can still read data from server socket.
// The server socket can write data to client, a read on the server socket
// will return zero bytes (EOF) immediately. After TCP_DOWNLINK_TIMEOUT and
// reading out all previous transfered data, a read on client socket should
// reading out all previous transferred data, a read on client socket should
// also return zero bytes immediately even though we havn't explicitly
// shutdown the server socket, this verifies TCP_DOWNLINK_TIMEOUT works as
// expected.
Expand Down

0 comments on commit e4ce359

Please sign in to comment.