From c2e5fdb283c39d65601a06657a8d22f39fa4bed1 Mon Sep 17 00:00:00 2001 From: Paul-Louis Ageneau Date: Sat, 11 May 2024 17:51:09 +0200 Subject: [PATCH] Fix getsockname instead of getpeername in exception message --- src/impl/tcptransport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/impl/tcptransport.cpp b/src/impl/tcptransport.cpp index b3af2c209..a83fda958 100644 --- a/src/impl/tcptransport.cpp +++ b/src/impl/tcptransport.cpp @@ -69,7 +69,7 @@ TcpTransport::TcpTransport(socket_t sock, state_callback callback) struct sockaddr_storage addr; socklen_t addrlen = sizeof(addr); if (::getpeername(mSock, reinterpret_cast(&addr), &addrlen) < 0) - throw std::runtime_error("getsockname failed"); + throw std::runtime_error("getpeername failed"); unmap_inet6_v4mapped(reinterpret_cast(&addr), &addrlen);