aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2017-08-22 02:14:59 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2017-08-22 18:56:25 -0700
commit2411bacd048227a68336082067950933920ba1c1 (patch)
treebe1db4e299ef8c6b786b947e77bdaa2195727285
parentee3e3310bb22aa0422d22a6adb138ab0692541eb (diff)
Address review comments
-rw-r--r--include/grpc++/channel.h2
-rw-r--r--src/cpp/client/channel_cc.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h
index 73f28a182c..3849240574 100644
--- a/include/grpc++/channel.h
+++ b/include/grpc++/channel.h
@@ -31,9 +31,7 @@ struct grpc_channel;
namespace grpc {
class ChannelConnectivityWatcher;
-}
-namespace grpc {
/// Channels represent a connection to an endpoint. Created by \a CreateChannel.
class Channel final : public ChannelInterface,
public CallHook,
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index 38977cb4e7..78f5de0d04 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -50,7 +50,7 @@ void WatchStateChange(void* arg);
// support.
class ChannelConnectivityWatcher {
public:
- ChannelConnectivityWatcher(Channel* channel)
+ explicit ChannelConnectivityWatcher(Channel* channel)
: channel_(channel), thd_id_(0), being_destroyed_(0) {}
void WatchStateChangeImpl() {
@@ -67,6 +67,7 @@ class ChannelConnectivityWatcher {
state = channel_->GetState(false);
}
}
+
void StartWatching() {
gpr_thd_options options = gpr_thd_options_default();
gpr_thd_options_set_joinable(&options);