Skip to content

Commit

Permalink
Merge pull request #120 from mxinden/default-on-read
Browse files Browse the repository at this point in the history
src/lib: Default to WindowUpdateMode::OnRead
  • Loading branch information
mxinden authored Jun 8, 2021
2 parents e2368ec + ab4fe45 commit d3685da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 0.10.0 [unreleased]

- Default to `WindowUpdateMode::OnRead`, thus enabling full Yamux flow-control,
exercising back pressure on senders, preventing stream resets due to reaching
the buffer limit.

See the [`WindowUpdateMode` documentation] for details, especially the section
on deadlocking when sending data larger than the receivers window.

[`WindowUpdateMode` documentation]: https://docs.rs/yamux/0.9.0/yamux/enum.WindowUpdateMode.html

# 0.9.0

- Force-split larger frames, for better interleaving of
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yamux"
version = "0.9.0"
version = "0.10.0"
authors = ["Parity Technologies <[email protected]>"]
license = "Apache-2.0 OR MIT"
description = "Multiplexer over reliable, ordered connections"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub enum WindowUpdateMode {
/// - receive window = 256 KiB
/// - max. buffer size (per stream) = 1 MiB
/// - max. number of streams = 8192
/// - window update mode = on receive
/// - window update mode = on read
/// - read after close = true
/// - split send size = 16 KiB
#[derive(Debug, Clone)]
Expand All @@ -109,7 +109,7 @@ impl Default for Config {
receive_window: DEFAULT_CREDIT,
max_buffer_size: 1024 * 1024,
max_num_streams: 8192,
window_update_mode: WindowUpdateMode::OnReceive,
window_update_mode: WindowUpdateMode::OnRead,
read_after_close: true,
split_send_size: DEFAULT_SPLIT_SEND_SIZE
}
Expand Down

0 comments on commit d3685da

Please sign in to comment.