The sequence of task executions continues indefinitely until one of the following exceptional completions occur:
The task is explicitly cancelled via the returned future.
The executor terminates, also resulting in task cancellation.
An execution of the task throws an exception. In this case calling get on the returned future will throw ExecutionException, holding the exception as its cause.
! java.net.SocketTimeoutException: timeout
! at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:678)
! at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:686)
! at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.java:154)
! at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.java:136)
! at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.java:115)
! at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:94)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
! at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
! at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
! at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
! at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
! at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
! at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
! at okhttp3.RealCall.execute(RealCall.java:81)
! at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
! at com.krillsson.sysapi.core.connectivity.ConnectivityCheckManager.resolveConnectivity(ConnectivityCheckManager.kt:30)
! at com.krillsson.sysapi.core.connectivity.ConnectivityCheckManager.onTick(ConnectivityCheckManager.kt:25)
! at com.krillsson.sysapi.util.Ticker.execute(Ticker.java:46)
! at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
! at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
! at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
! at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
! at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
! at java.base/java.lang.Thread.run(Thread.java:829)
From documentation: