Repository navigation
Conversation
`uvcpp_h3_wt_session::accept()` 发完 200 就返回了:会话建得出来,但服务端的 `on_open` **永远不触发**。客户端那条路(`on_connect_response()`)在 2xx 到达 后是把 on_open 调出去的,服务端漏了这一句 —— 而应用没有旁路能拿到会话 (`accept()` 的返回值要等它返回之后才有),于是流的落点、datagram 的分发都 接不上:自己开的双向流拿不到、datagram 全被丢掉。 补上这一句,并在 `http3_webtransport_func` 里钉住它:服务端 on_open 恰好一次、 且先于 accept() 返回。去掉这一句时该用例红(实际 0),补上就绿。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
uvcpp_h3_wt_session::accept()发完 200 就返回:会话对象建出来了,但服务端的on_open永远不触发。客户端那条路(
on_connect_response())在收到 2xx 后既置位又回调,服务端漏了这一句。应用没有别的办法拿到会话——
accept()的返回值要等它返回之后才有——于是:
open_bidi_stream()拿不到流(在on_open里开流是唯一自然的位置);修法
accept()在装好会话流落点之后,把on_open调出去一次(先拷出回调再调,与会话里其它回调同一条纪律)。
on_open在accept()返回之前触发,调用方此时还拿不到返回值——头文件里把这条时序写清楚,应用应当用回调参数接上会话。
验证
http3_webtransport_func里加了三条断言:服务端on_open恰好一次、先于accept()返回;原有的"被拒的会话不触发 on_open"仍然成立。FAIL: 服务端 on_open 恰好触发一次(实际 0)all checks passed本机
cmake --build --target test_http3_webtransport_func通过(HTTP3 + QUIC +OpenSSL 静态,draft-13)。