Why this matters
Bounded time prevents resource exhaustion and cascaded failures.
Set connect, read, and write timeouts for HTTP/DB/queue clients; never rely on indefinite waits.
Bounded time prevents resource exhaustion and cascaded failures.
Side-by-side examples engineers can pattern-match during review.
val client = OkHttpClient() // defaults onlyval client = OkHttpClient.Builder()
.connectTimeout(5, TimeUnit.SECONDS)
.readTimeout(10, TimeUnit.SECONDS)
.writeTimeout(10, TimeUnit.SECONDS)
.build()HttpClient()HttpClient(timeout = 10_000)From the same buckets as this rule.