aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-12-07 10:11:30 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2018-12-07 10:11:30 -0800
commit87b1c3ce56363a557f2874ab94b8af516e8ae532 (patch)
treedad6acf1e1588839ad8fb5afd7500021885d0a49 /src/core/ext/transport/chttp2
parentd7c252c9473a2a97eb441369603d8cc9ad64403c (diff)
reviewer feedback
Diffstat (limited to 'src/core/ext/transport/chttp2')
-rw-r--r--src/core/ext/transport/chttp2/client/chttp2_connector.cc3
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc6
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.h4
3 files changed, 7 insertions, 6 deletions
diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/src/core/ext/transport/chttp2/client/chttp2_connector.cc
index 62a07d2ba6..42a2e2e896 100644
--- a/src/core/ext/transport/chttp2/client/chttp2_connector.cc
+++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc
@@ -117,8 +117,9 @@ static void on_handshake_done(void* arg, grpc_error* error) {
c->args.interested_parties);
c->result->transport =
grpc_create_chttp2_transport(args->args, args->endpoint, true);
- c->result->socket_node =
+ grpc_core::RefCountedPtr<grpc_core::channelz::SocketNode> socket_node =
grpc_chttp2_transport_get_socket_node(c->result->transport);
+ c->result->socket_uuid = socket_node == nullptr ? 0 : socket_node->uuid();
GPR_ASSERT(c->result->transport);
// TODO(roth): We ideally want to wait until we receive HTTP/2
// settings from the server before we consider the connection
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 73e43131a0..9b6574b612 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -3145,11 +3145,11 @@ static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream),
static const grpc_transport_vtable* get_vtable(void) { return &vtable; }
-grpc_core::channelz::SocketNode* grpc_chttp2_transport_get_socket_node(
- grpc_transport* transport) {
+grpc_core::RefCountedPtr<grpc_core::channelz::SocketNode>
+grpc_chttp2_transport_get_socket_node(grpc_transport* transport) {
grpc_chttp2_transport* t =
reinterpret_cast<grpc_chttp2_transport*>(transport);
- return t->channelz_socket.get();
+ return t->channelz_socket;
}
grpc_transport* grpc_create_chttp2_transport(
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h
index b9929b1662..c22cfb0ad7 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h
@@ -36,8 +36,8 @@ grpc_transport* grpc_create_chttp2_transport(
const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client,
grpc_resource_user* resource_user = nullptr);
-grpc_core::channelz::SocketNode* grpc_chttp2_transport_get_socket_node(
- grpc_transport* transport);
+grpc_core::RefCountedPtr<grpc_core::channelz::SocketNode>
+grpc_chttp2_transport_get_socket_node(grpc_transport* transport);
/// Takes ownership of \a read_buffer, which (if non-NULL) contains
/// leftover bytes previously read from the endpoint (e.g., by handshakers).