Skip to content

Commit

Permalink
Fix TLS connection for sendAuth in replication
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Sep 20, 2023
1 parent 3092081 commit ac497ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cluster/replication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ac497ec

Please sign in to comment.