diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-08-10 12:28:04 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-08-10 12:28:04 -0400 |
commit | f04c0ab0fc7574291a7d5e6a6dc119998fba535f (patch) | |
tree | d4527910822d60d64f70c1dedb7233210088f6f8 /util | |
parent | d4961e1575f4a4229863eaf71b810cd0d9daf9c5 (diff) | |
download | mongo-f04c0ab0fc7574291a7d5e6a6dc119998fba535f.tar.gz |
don't lookup unknown address MINOR
Diffstat (limited to 'util')
-rw-r--r-- | util/sock.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/sock.cpp b/util/sock.cpp index 36ee1e918fb..0b8ae04b128 100644 --- a/util/sock.cpp +++ b/util/sock.cpp @@ -24,6 +24,10 @@ namespace mongo { static boost::mutex sock_mutex; string hostbyname(const char *hostname) { + static string unknown = "0.0.0.0"; + if ( unknown == hostname ) + return unknown; + boostlock lk(sock_mutex); #if defined(_WIN32) if( inet_addr(hostname) != INADDR_NONE ) |