From f2141e932974ef7cdc141fe4451a614d5399befb Mon Sep 17 00:00:00 2001 From: Sigma711 <1979934715@qq.com> Date: Mon, 28 Aug 2023 19:17:21 -0400 Subject: [PATCH] [src] Print connection error info by the user buffer instead of the return value of strerror_r() in Connecting --- src/connecting.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connecting.cc b/src/connecting.cc index f27ce50b..46468a68 100644 --- a/src/connecting.cc +++ b/src/connecting.cc @@ -116,7 +116,7 @@ void Connecting::DoWithError() const { } char errno_info[512]; auto tmp_ptr = ::strerror_r(saved_errno, errno_info, sizeof(errno_info)); - LOG_ERROR("Fd(%d) gets an error -- %s!!!", Fd(), tmp_ptr); + LOG_ERROR("Fd(%d) gets an error -- %s!!!", Fd(), errno_info); } void Connecting::OnEstablishing() {