Fix incorrect checkArgument

This commit is contained in:
chimp1984 2020-12-13 17:18:07 -05:00
parent 5be2ea5830
commit 3b0ad356b4
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3

View file

@ -128,7 +128,7 @@ public class HttpClientImpl implements HttpClient {
@Nullable String headerKey, @Nullable String headerKey,
@Nullable String headerValue) throws IOException { @Nullable String headerValue) throws IOException {
checkNotNull(baseUrl, "baseUrl must be set before calling doRequest"); checkNotNull(baseUrl, "baseUrl must be set before calling doRequest");
checkArgument(hasPendingRequest, "We got called on the same HttpClient again while a request is still open."); checkArgument(!hasPendingRequest, "We got called on the same HttpClient again while a request is still open.");
hasPendingRequest = true; hasPendingRequest = true;
Socks5Proxy socks5Proxy = getSocks5Proxy(socks5ProxyProvider); Socks5Proxy socks5Proxy = getSocks5Proxy(socks5ProxyProvider);