This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new dda14077 Fix TLS connection for sendAuth in replication (#1769)
dda14077 is described below

commit dda1407766a613a6821fc26abd3e10abddf251a9
Author: Twice <[email protected]>
AuthorDate: Wed Sep 20 20:23:34 2023 +0900

    Fix TLS connection for sendAuth in replication (#1769)
---
 src/cluster/replication.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cluster/replication.cc b/src/cluster/replication.cc
index 38548418..a6110a86 100644
--- a/src/cluster/replication.cc
+++ b/src/cluster/replication.cc
@@ -839,8 +839,8 @@ Status ReplicationThread::sendAuth(int sock_fd, ssl_st 
*ssl) {
     auto s = util::SockSend(sock_fd, auth_command, ssl);
     if (!s.IsOK()) return s.Prefixed("send auth command err");
     while (true) {
-      if (evbuffer_read(evbuf.get(), sock_fd, -1) <= 0) {
-        return Status::FromErrno("read auth response err");
+      if (auto s = util::EvbufferRead(evbuf.get(), sock_fd, -1, ssl); !s) {
+        return std::move(s).Prefixed("read auth response err");
       }
       UniqueEvbufReadln line(evbuf.get(), EVBUFFER_EOL_CRLF_STRICT);
       if (!line) continue;

Reply via email to