Timeout twice as long as configured for AuthorizationServiceConfiguration.fetchFromUrl(Uri openIdConnectDiscoveryUri, RetrieveConfigurationCallback callback)? #840
I am trying to retrieve an OpenID Connect Discovery document by calling AuthorizationServiceConfiguration.fetchFromUrl(openIdConnectDiscoveryUri, callback) towards and endpoint (where I expect it to fail... This is to test error handling) and I get this error after ~30s (notice the timestamps):
2022-06-08 14:22:37.909 27365-27365/com.mycompany.myapp I/AuthenticationPersModel: [I=1, T=M] signIn(context=[hidden])
...
2022-06-08 14:23:08.126 27365-28830/com.mycompany.myapp E/AppAuth: Network error when retrieving discovery document
java.net.SocketTimeoutException: failed to connect to mykeycloakserver.com/x.y.z.q (port 8083) from /192.168.201.29 (port 50032) after 15000ms
For reference, the default timeout config settings in net.openid.appauth.connectivity.DefaultConnectionBuilder:
private static final int CONNECTION_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(15);
private static final int READ_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(10);
I was expecting to get the timeout error after 15s (default connection timeout). Why do I instead get the error after 2x15s?
Configuration
Description
I am trying to retrieve an OpenID Connect Discovery document by calling
AuthorizationServiceConfiguration.fetchFromUrl(openIdConnectDiscoveryUri, callback)
towards and endpoint (where I expect it to fail... This is to test error handling) and I get this error after ~30s (notice the timestamps):For reference, the default timeout config settings in
net.openid.appauth.connectivity.DefaultConnectionBuilder
:I was expecting to get the timeout error after 15s (default connection timeout). Why do I instead get the error after 2x15s?