acelyc111 commented on code in PR #1914:
URL:
https://github.com/apache/incubator-pegasus/pull/1914#discussion_r1498554810
##########
src/zookeeper/zookeeper_session.cpp:
##########
@@ -158,27 +167,48 @@ int zookeeper_session::attach(void *callback_owner, const
state_callback &cb)
{
utils::auto_write_lock l(_watcher_lock);
if (nullptr == _handle) {
- if (FLAGS_enable_zookeeper_kerberos) {
+ if (utils::is_empty(FLAGS_sasl_mechanisms_type)) {
+ _handle = zookeeper_init(
+ FLAGS_hosts_list, global_watcher, FLAGS_timeout_ms, nullptr,
this, 0);
+ } else {
+ int err = sasl_client_init(nullptr);
Review Comment:
To improve the readability, you can reduce the indents, for example:
```
utils::auto_write_lock l(_watcher_lock);
if (nullptr != _handle) {
return;
}
if (<kerberos_is_disabled>) {
...
return;
}
int err = sasl_client_init(nullptr);
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]