why is send_trailers()/finish needed before waiting for response ? #218
Closed
gopakumarce
started this conversation in
General
Replies: 2 comments 3 replies
-
I am guessing this is because on the client side, after calling send_data(), I don't see what really kick starts the quinn layer to go send that data. The example talks about the driver.poll_close(), but that just seems to be listening for control frames, isnt there some form of driver activity that should also keep checking for data to send and trigger a quinn conn.wakeup() and all that ? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Closing this query - it looks like its a bug, raised #219 for that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
All the examples and documentation says that after send_request() and send_data(), one has to call send_trailers() or finish() before waiting to read response - but why is that, I mean its upto the server right ? The server can choose to respond with a response as soon as it gets a request, and then process the body after that.
The reason I ask is, on the client if I try a sequence like below
And on the server I when I get a request, I do
After step3 on client, I do not do any send_trailer or finish(). What I see is that server gets the request, sends the response, client gets the response all right, client says send_data() is successful, but the recv_data() on server just waits for ever - if I close the connection, then suddenly recv_data() on server gets the data sent by the client, which kind of points into the direction of needing to call a finish()
But ive been going through the h3 code and I just cant figure out why the server would not immediately get the data in recv_data() that was sent by client in send_data() regardless of finish()/send_trailer() being called. I cant see where is that dependency - but it seems to be there somewhere because my server recv_data() hangs .. Any pointers to where in the code that dependency is there would be really appreciated (and some context on why that is the case)
Beta Was this translation helpful? Give feedback.
All reactions