Is this a bug?

18 views
Skip to first unread message

徐鹏浩

unread,
Nov 7, 2021, 10:36:09 PM11/7/21
to net-dev
Hi  net-dev,
When a first Http2 request reused a preconnect connection,  the socket_reused fieled of struct LoadTimingInfo is false but the ConnectTiming is NULL. Is this a bug or not?
The code show below :
And when the client_socket_handle_ assigned by this function:
net/socket/transport_client_socket_pool.cc line 502:

Adam Rice

unread,
Nov 8, 2021, 12:00:23 AM11/8/21
to 徐鹏浩, net-dev
I think this may be correct. The socket has not yet been used for any requests, so it is not "reused". However, since it preconnected, there is no ConnectTiming info.

For this kind of thing it is best to file an issue at crbug.com even if you are not sure if it is a bug or not.

--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/b82437a7-bbd9-48ee-8e3a-e1426461022cn%40chromium.org.

徐鹏浩

unread,
Nov 8, 2021, 1:30:09 AM11/8/21
to net-dev, Adam Rice, net-dev, 徐鹏浩
Well,  you are right from this point of view.  But in Http1.1  Protocol,  the behavior is completely opposite.
the code show as below:
bool HttpBasicStream::GetLoadTimingInfo(
LoadTimingInfo* load_timing_info) const {
if (!state_.connection()->GetLoadTimingInfo(IsConnectionReused(),
load_timing_info) ||
!parser()) {
return false;
}.....
***************************************
IsConnectionReused function:
bool HttpBasicState::IsConnectionReused() const {
return connection_->is_reused() ||
connection_->reuse_type() == ClientSocketHandle::UNUSED_IDLE;
}

In Http1.1 request, reusing a preconnected connection(ClientSocketHandle::UNUSED_IDLE type) , the socket_reused fieled is judged as true.
So, this is an inconsistent behavior.



Reply all
Reply to author
Forward
0 new messages