Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make rawQuery timeout handling more thread-safe
Previous 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.
- Loading branch information