Closed serzhiio closed 1 year ago
Those logs seem to indicate that you've received two streams in full at about the same time. What does your code look like?
It looks like twqo packets aggregated together comes at once and i think it could be only one at a time. So the reason for this bahavior is likely this part of my code:
match stream_event {
StreamEvent::Opened { dir } => {
crate::log::trace!("- opened {dir}");
remote_stream = conn.inner.streams().accept(dir).unwrap();
}
}
maybe this? :
while let Some(remote_stream) = conn.inner.streams().accept(dir) {
...
}
There is nothing specifically wrong with those small fragments of code. Maybe try making a self-contained minimal reproduction?
The reason of my problem was expecting only one Stream when several could come in one packet and I thought that i will receive Opened
event for each stream separately using while let Some(event) = conn.poll() {...}
.
How it was:
StreamEvent::Opened { dir } => {
let remote_stream = conn.streams().accept(dir).unwrap();
}
How it work:
StreamEvent::Opened { dir } => {
while let Some(remote_stream) = conn.streams().accept(dir) {
...
}
}
Sorry for disturbing you, the library still have a lot of unknow's for me especially considering io_uring.
Want to propose any documentation improvements that would have made this more obvious?
Client creating two UNI streams and sending data to them. Both streams created and used at once. Server sees only one stream's data. I can't understand where is second stream's data? The log contains info that both streams came, but not all data.
P.S.: If i send two different streams(UNI+Bidi) i receive both of them.
Here is server log: