Skip to content

Commit

Permalink
Fix getsockname instead of getpeername in exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau committed May 11, 2024
1 parent 4978ea7 commit c1985b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/impl/tcptransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<struct sockaddr *>(&addr), &addrlen) < 0)
throw std::runtime_error("getsockname failed");
throw std::runtime_error("getpeername failed");

unmap_inet6_v4mapped(reinterpret_cast<struct sockaddr *>(&addr), &addrlen);

Expand Down

0 comments on commit c1985b6

Please sign in to comment.