mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Better getAddr for unix sockets
This commit is contained in:
parent
d02c18cde4
commit
afafbfa5a7
@ -167,7 +167,7 @@ namespace mongo {
|
||||
case AF_INET: return inet_ntop(getType(), &as<sockaddr_in>().sin_addr, buffer, addressSize);
|
||||
case AF_INET6: return inet_ntop(getType(), &as<sockaddr_in6>().sin6_addr, buffer, addressSize);
|
||||
#endif
|
||||
case AF_UNIX: return as<sockaddr_un>().sun_path;
|
||||
case AF_UNIX: return (addressSize > 2 ?as<sockaddr_un>().sun_path : "anonymous unix socket");
|
||||
case AF_UNSPEC: return "(NONE)";
|
||||
default: massert(SOCK_FAMILY_UNKNOWN_ERROR, "unsupported address family", false); return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user