]> git.ipfire.org Git - thirdparty/curl.git/commit
resolve: cache lookup for async resolvers
authorMichael Wallner <mike@php.net>
Wed, 20 Aug 2014 21:31:53 +0000 (23:31 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 31 Aug 2014 08:49:40 +0000 (10:49 +0200)
commit09b5a99816a24a12f769f61db5f7eafd4bc32795
tree1b91304501ae6eed8c832ec140acce4dfceeb4ab
parent2434a4e88de35a0c7eced46f010292e2b4bfb851
resolve: cache lookup for async resolvers

While waiting for a host resolve, check if the host cache may have
gotten the name already (by someone else), for when the same name is
resolved by several simultanoues requests.

The resolver thread occasionally gets stuck in getaddrinfo() when the
DNS or anything else is crappy or slow, so when a host is found in the
DNS cache, leave the thread alone and let itself cleanup the mess.
lib/asyn-thread.c
lib/hostip.c
lib/hostip.h
lib/multi.c