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 92b854d commit c2e5fdb
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 c2e5fdb

Please sign in to comment.