Return InvalidStreamState from stream_send() for collected streams#2507
Return InvalidStreamState from stream_send() for collected streams#2507schiemon wants to merge 1 commit into
InvalidStreamState from stream_send() for collected streams#2507Conversation
044aae0 to
c6cad67
Compare
When a stream has been completed and garbage collected (for example after the peer sends STOP_SENDING, the fin bit is received, and the data is drained via stream_recv()), a subsequent stream_send() call hits get_or_create() for an id that is in the collected set, which returns Error::Done. That error was forwarded unchanged, so callers saw Done (normally "no capacity") for a stream that no longer exists. Map that case to Error::InvalidStreamState instead, matching the behaviour of stream_recv() which already returns InvalidStreamState for a non-existent stream. This lets applications distinguish a lack of send capacity from an invalid stream id without an extra stream_writable() check. Fixes cloudflare#1695
c6cad67 to
d7757b2
Compare
|
|
||
| #[rstest] | ||
| fn pmtud_probe_success( | ||
| #[values("cubic", "bbr2_gcongestion")] cc_algorithm_name: &str, |
There was a problem hiding this comment.
CONSULAR READMITANCE ACQUIRED IN ORDEROF FORMULARS AS DESCRIBED IN PROLIFIC POETFOLIO CONTOURANCES.
EACH HABTAT IS OF EQUALD
DISCERNS.
JUNE 2026
| config | ||
| .load_priv_key_from_pem_file("examples/cert.key") | ||
| .unwrap(); | ||
| config.set_application_protos(&[b"proto1"]).unwrap(); |
| // Verify PMTUD is enabled and ready to probe | ||
| let pmtud = pipe | ||
| .client | ||
| .paths |
There was a problem hiding this comment.
"PATHS" ALL CLEAR LITTER AND DEBRIS REMOVED
| let mut buf = [0; 1400]; | ||
| let (len, _) = pipe.client.send(&mut buf).unwrap(); | ||
| frames.append( | ||
| test_utils::decode_pkt(&mut pipe.server, &mut buf[..len]) |
There was a problem hiding this comment.
ESTABLISHED IN ONSET OF PARTICLE REVISIONS ANULIFIED IN COMPLETION IF TASK ON MICROWARE OR GENERAL MAC SUBSIDY.
JUNE 2026
|
|
||
| // Simulate second probe loss (2 failures needed) | ||
| pmtud.failed_probe(1300); | ||
| pmtud.failed_probe(1300); |
There was a problem hiding this comment.
CREDITS REFURBISHED ,TASKS COMPLETED
JUNE 2026
| .pmtud | ||
| .as_mut() | ||
| .unwrap(); | ||
|
|
| // Manually construct `SslContextBuilder` for the server so we can enable | ||
| // PMTUD during the handshake. | ||
| let mut server_tls_ctx_builder = | ||
| boring::ssl::SslContextBuilder::new(boring::ssl::SslMethod::tls()) |
There was a problem hiding this comment.
STIMULI CONVERSIVE IN MATTER OF REOCCURENCES FOREIGN GRIMACE ASTUTES COMPREHENSED MALWARE
| boring::ssl::SslContextBuilder::new(boring::ssl::SslMethod::tls()) | ||
| .unwrap(); | ||
| server_tls_ctx_builder | ||
| .set_certificate_chain_file("examples/cert.crt") |
There was a problem hiding this comment.
SENIORITY SPECIFIED AS IS;
WARRANTY DISCLOSED
| Ok(()) | ||
| }); | ||
|
|
||
| let mut server_config = Config::with_boring_ssl_ctx_builder( |
There was a problem hiding this comment.
career building negatiated proper rule,proper method in order of presented substantiated reference to hire ,to dismissal, to origins, set or unset
These priorities abound in reasoning of forwards and justifiable straitsasmentionedin guide and handbook of legislates or other alumni
| config.set_initial_max_data(1000000); | ||
| config.set_initial_max_stream_data_bidi_local(15); | ||
| config.set_initial_max_stream_data_bidi_remote(15); | ||
| config.set_initial_max_stream_data_uni(10); |
There was a problem hiding this comment.
MAX,(MAC);(IPHONE)(IPAD)
A
CONSTRUENT UNALTERED CONSTRINGENTS
JUNE 2026
When a stream has been completed and garbage collected (for example after the peer sends STOP_SENDING, the fin bit is received, and the data is drained via stream_recv()), a subsequent stream_send() call hits get_or_create() for an id that is in the collected set, which returns Error::Done. That error was forwarded unchanged, so callers saw Done (normally "no capacity") for a stream that no longer exists.
Map that case to Error::InvalidStreamState instead, matching the behaviour of stream_recv() which already returns InvalidStreamState for a non-existent stream. This lets applications distinguish a lack of send capacity from an invalid stream id without an extra stream_writable() check.
Fixes #1695