Skip to content

Commit

Permalink
Clarify when may_receive_application_data is set.
Browse files Browse the repository at this point in the history
`start_incoming_traffic()` doesn't need to exist as a `pub(crate)`
function, or at all, because it is only used by the function right
below it. Inline it into that function to make it clearer when
`may_receive_application_data` is set.
  • Loading branch information
briansmith authored and djc committed Jan 21, 2022
1 parent be5b397 commit 3e46625
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rustls/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1113,12 +1113,8 @@ impl CommonState {
self.flush_plaintext();
}

pub(crate) fn start_incoming_traffic(&mut self) {
self.may_receive_application_data = true;
}

pub(crate) fn start_traffic(&mut self) {
self.start_incoming_traffic();
self.may_receive_application_data = true;
self.start_outgoing_traffic();
}

Expand Down

0 comments on commit 3e46625

Please sign in to comment.