Skip to content

Added read/write timeout support to Rust TTcpChannel#3399

Open
ShemShadrack wants to merge 1 commit intoapache:masterfrom
ShemShadrack:thrift
Open

Added read/write timeout support to Rust TTcpChannel#3399
ShemShadrack wants to merge 1 commit intoapache:masterfrom
ShemShadrack:thrift

Conversation

@ShemShadrack
Copy link
Copy Markdown

Summary

Add timeout configuration support to the Rust TTcpChannel.

This change adds:

  • set_read_timeout
  • set_write_timeout
  • set_timeouts

Timeouts are applied immediately when the channel already wraps an open
TcpStream, and cached for later application when the channel is opened
after configuration.

Testing

Verified with:

  • cargo fmt --manifest-path lib/rs/Cargo.toml --all -- --check
  • cargo test --manifest-path lib/rs/Cargo.toml

Added unit tests covering:

  • setting timeouts before open()
  • applying cached timeouts during open()
  • setting timeouts on wrapped streams
  • clearing timeouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant