Skip to content

Commit 954691b

Browse files
committed
Shortcut localhost to 127.0.0.1 in c-ares lookup
1 parent 801a086 commit 954691b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

LookupService.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ bool LookupInit()
164164

165165
std::vector<SLookupBlockingResult> LookupWithTimeout(std::string pServer, int timeoutms, int stop_timeoutms)
166166
{
167+
if (pServer == "localhost")
168+
{
169+
pServer = "127.0.0.1";
170+
}
171+
167172
unsigned int addr = inet_addr(pServer.c_str());
168173
if (addr != INADDR_NONE)
169174
{

0 commit comments

Comments
 (0)