shem created THRIFT-5954:
----------------------------
Summary: Rust: Add read/write timeout support to TTcpChannel
Key: THRIFT-5954
URL: https://issues.apache.org/jira/browse/THRIFT-5954
Project: Thrift
Issue Type: New Feature
Components: Rust - Compiler
Affects Versions: 0.24.0
Environment: macOS / Rust toolchain / Apache Thrift Rust library
(lib/rs)
Reporter: shem
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.
h2. 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
Related PR:
https://github.com/apache/thrift/pull/3399
--
This message was sent by Atlassian Jira
(v8.20.10#820010)