Previously an elapsed duration was saved on the Client object and was updated multiple times on each call to rawQuery. This could lead to a race condition when calling whois.Whois(...) in parallel, where one thread halfway through the function has a non-zero elapsed duration and another thread entering the function sets it to 0. This removes the elapsed field on the Client object and uses a local variable instead, which avoids the aforementioned issue.
Previously an
elapsed
duration was saved on theClient
object and was updated multiple times on each call torawQuery
. This could lead to a race condition when callingwhois.Whois(...)
in parallel, where one thread halfway through the function has a non-zero elapsed duration and another thread entering the function sets it to 0. This removes theelapsed
field on theClient
object and uses a local variable instead, which avoids the aforementioned issue.